From f4d08e4133dde2af8d7ddccacd48a1fde658bef4 Mon Sep 17 00:00:00 2001 From: Chumva Date: Mon, 4 Nov 2019 22:06:33 +0200 Subject: [PATCH] Add old aidl api to tracker --- .../net/osmand/aidl/IOsmAndAidlCallback.aidl | 54 ++ .../net/osmand/aidl/IOsmAndAidlInterface.aidl | 849 ++++++++++++++++++ .../calculateroute/CalculateRouteParams.aidl | 3 + .../calculateroute/CalculateRouteParams.java | 100 +++ .../aidl/contextmenu/AContextMenuButton.aidl | 3 + .../aidl/contextmenu/AContextMenuButton.java | 101 +++ .../contextmenu/ContextMenuButtonsParams.aidl | 3 + .../contextmenu/ContextMenuButtonsParams.java | 105 +++ .../RemoveContextMenuButtonsParams.aidl | 3 + .../RemoveContextMenuButtonsParams.java | 53 ++ .../UpdateContextMenuButtonsParams.aidl | 3 + .../UpdateContextMenuButtonsParams.java | 43 + .../osmand/aidl/copyfile/CopyFileParams.aidl | 3 + .../osmand/aidl/copyfile/CopyFileParams.java | 78 ++ .../CustomizationInfoParams.aidl | 3 + .../CustomizationInfoParams.java | 172 ++++ .../OsmandSettingsInfoParams.aidl | 3 + .../OsmandSettingsInfoParams.java | 50 ++ .../customization/OsmandSettingsParams.aidl | 3 + .../customization/OsmandSettingsParams.java | 60 ++ .../aidl/customization/SetWidgetsParams.aidl | 3 + .../aidl/customization/SetWidgetsParams.java | 93 ++ .../net/osmand/aidl/favorite/AFavorite.aidl | 3 + .../net/osmand/aidl/favorite/AFavorite.java | 96 ++ .../aidl/favorite/AddFavoriteParams.aidl | 3 + .../aidl/favorite/AddFavoriteParams.java | 47 + .../aidl/favorite/RemoveFavoriteParams.aidl | 3 + .../aidl/favorite/RemoveFavoriteParams.java | 47 + .../aidl/favorite/UpdateFavoriteParams.aidl | 3 + .../aidl/favorite/UpdateFavoriteParams.java | 55 ++ .../aidl/favorite/group/AFavoriteGroup.aidl | 3 + .../aidl/favorite/group/AFavoriteGroup.java | 63 ++ .../group/AddFavoriteGroupParams.aidl | 3 + .../group/AddFavoriteGroupParams.java | 47 + .../group/RemoveFavoriteGroupParams.aidl | 3 + .../group/RemoveFavoriteGroupParams.java | 47 + .../group/UpdateFavoriteGroupParams.aidl | 3 + .../group/UpdateFavoriteGroupParams.java | 55 ++ .../src/net/osmand/aidl/gpx/AGpxBitmap.aidl | 4 + .../src/net/osmand/aidl/gpx/AGpxBitmap.java | 46 + .../src/net/osmand/aidl/gpx/AGpxFile.aidl | 3 + .../src/net/osmand/aidl/gpx/AGpxFile.java | 88 ++ .../net/osmand/aidl/gpx/AGpxFileDetails.aidl | 3 + .../net/osmand/aidl/gpx/AGpxFileDetails.java | 196 ++++ .../net/osmand/aidl/gpx/ASelectedGpxFile.aidl | 3 + .../net/osmand/aidl/gpx/ASelectedGpxFile.java | 85 ++ .../aidl/gpx/CreateGpxBitmapParams.aidl | 3 + .../aidl/gpx/CreateGpxBitmapParams.java | 101 +++ .../net/osmand/aidl/gpx/GpxColorParams.aidl | 3 + .../net/osmand/aidl/gpx/GpxColorParams.java | 66 ++ .../net/osmand/aidl/gpx/HideGpxParams.aidl | 3 + .../net/osmand/aidl/gpx/HideGpxParams.java | 45 + .../net/osmand/aidl/gpx/ImportGpxParams.aidl | 3 + .../net/osmand/aidl/gpx/ImportGpxParams.java | 106 +++ .../net/osmand/aidl/gpx/RemoveGpxParams.aidl | 3 + .../net/osmand/aidl/gpx/RemoveGpxParams.java | 48 + .../net/osmand/aidl/gpx/ShowGpxParams.aidl | 3 + .../net/osmand/aidl/gpx/ShowGpxParams.java | 44 + .../aidl/gpx/StartGpxRecordingParams.aidl | 3 + .../aidl/gpx/StartGpxRecordingParams.java | 40 + .../aidl/gpx/StopGpxRecordingParams.aidl | 3 + .../aidl/gpx/StopGpxRecordingParams.java | 40 + .../src/net/osmand/aidl/map/ALatLon.aidl | 3 + .../src/net/osmand/aidl/map/ALatLon.java | 83 ++ .../osmand/aidl/map/SetMapLocationParams.aidl | 3 + .../osmand/aidl/map/SetMapLocationParams.java | 68 ++ .../net/osmand/aidl/maplayer/AMapLayer.aidl | 3 + .../net/osmand/aidl/maplayer/AMapLayer.java | 176 ++++ .../aidl/maplayer/AddMapLayerParams.aidl | 3 + .../aidl/maplayer/AddMapLayerParams.java | 44 + .../aidl/maplayer/RemoveMapLayerParams.aidl | 3 + .../aidl/maplayer/RemoveMapLayerParams.java | 44 + .../aidl/maplayer/UpdateMapLayerParams.aidl | 3 + .../aidl/maplayer/UpdateMapLayerParams.java | 44 + .../osmand/aidl/maplayer/point/AMapPoint.aidl | 3 + .../osmand/aidl/maplayer/point/AMapPoint.java | 125 +++ .../maplayer/point/AddMapPointParams.aidl | 3 + .../maplayer/point/AddMapPointParams.java | 51 ++ .../maplayer/point/RemoveMapPointParams.aidl | 3 + .../maplayer/point/RemoveMapPointParams.java | 51 ++ .../maplayer/point/ShowMapPointParams.aidl | 3 + .../maplayer/point/ShowMapPointParams.java | 56 ++ .../maplayer/point/UpdateMapPointParams.aidl | 3 + .../maplayer/point/UpdateMapPointParams.java | 59 ++ .../net/osmand/aidl/mapmarker/AMapMarker.aidl | 3 + .../net/osmand/aidl/mapmarker/AMapMarker.java | 63 ++ .../aidl/mapmarker/AddMapMarkerParams.aidl | 3 + .../aidl/mapmarker/AddMapMarkerParams.java | 44 + .../aidl/mapmarker/RemoveMapMarkerParams.aidl | 3 + .../aidl/mapmarker/RemoveMapMarkerParams.java | 44 + .../mapmarker/RemoveMapMarkersParams.aidl | 3 + .../mapmarker/RemoveMapMarkersParams.java | 37 + .../aidl/mapmarker/UpdateMapMarkerParams.aidl | 3 + .../aidl/mapmarker/UpdateMapMarkerParams.java | 52 ++ .../net/osmand/aidl/mapwidget/AMapWidget.aidl | 3 + .../net/osmand/aidl/mapwidget/AMapWidget.java | 110 +++ .../aidl/mapwidget/AddMapWidgetParams.aidl | 3 + .../aidl/mapwidget/AddMapWidgetParams.java | 43 + .../aidl/mapwidget/RemoveMapWidgetParams.aidl | 3 + .../aidl/mapwidget/RemoveMapWidgetParams.java | 43 + .../aidl/mapwidget/UpdateMapWidgetParams.aidl | 3 + .../aidl/mapwidget/UpdateMapWidgetParams.java | 43 + .../aidl/navdrawer/NavDrawerFooterParams.aidl | 3 + .../aidl/navdrawer/NavDrawerFooterParams.java | 68 ++ .../aidl/navdrawer/NavDrawerHeaderParams.aidl | 3 + .../aidl/navdrawer/NavDrawerHeaderParams.java | 68 ++ .../osmand/aidl/navdrawer/NavDrawerItem.aidl | 3 + .../osmand/aidl/navdrawer/NavDrawerItem.java | 73 ++ .../navdrawer/SetNavDrawerItemsParams.aidl | 3 + .../navdrawer/SetNavDrawerItemsParams.java | 56 ++ .../aidl/navigation/ADirectionInfo.aidl | 3 + .../aidl/navigation/ADirectionInfo.java | 73 ++ .../navigation/ANavigationUpdateParams.aidl | 4 + .../navigation/ANavigationUpdateParams.java | 57 ++ .../ANavigationVoiceRouterMessageParams.aidl | 3 + .../ANavigationVoiceRouterMessageParams.java | 56 ++ .../aidl/navigation/MuteNavigationParams.aidl | 3 + .../aidl/navigation/MuteNavigationParams.java | 38 + .../aidl/navigation/NavigateGpxParams.aidl | 3 + .../aidl/navigation/NavigateGpxParams.java | 69 ++ .../aidl/navigation/NavigateParams.aidl | 3 + .../aidl/navigation/NavigateParams.java | 104 +++ .../aidl/navigation/NavigateSearchParams.aidl | 3 + .../aidl/navigation/NavigateSearchParams.java | 106 +++ .../navigation/OnVoiceNavigationParams.aidl | 3 + .../navigation/OnVoiceNavigationParams.java | 57 ++ .../navigation/PauseNavigationParams.aidl | 3 + .../navigation/PauseNavigationParams.java | 38 + .../navigation/ResumeNavigationParams.aidl | 3 + .../navigation/ResumeNavigationParams.java | 38 + .../aidl/navigation/StopNavigationParams.aidl | 3 + .../aidl/navigation/StopNavigationParams.java | 38 + .../navigation/UnmuteNavigationParams.aidl | 3 + .../navigation/UnmuteNavigationParams.java | 38 + .../aidl/note/StartAudioRecordingParams.aidl | 3 + .../aidl/note/StartAudioRecordingParams.java | 56 ++ .../aidl/note/StartVideoRecordingParams.aidl | 3 + .../aidl/note/StartVideoRecordingParams.java | 56 ++ .../osmand/aidl/note/StopRecordingParams.aidl | 3 + .../osmand/aidl/note/StopRecordingParams.java | 42 + .../osmand/aidl/note/TakePhotoNoteParams.aidl | 3 + .../osmand/aidl/note/TakePhotoNoteParams.java | 56 ++ .../net/osmand/aidl/plugins/PluginParams.aidl | 5 + .../net/osmand/aidl/plugins/PluginParams.java | 51 ++ .../net/osmand/aidl/search/SearchParams.aidl | 3 + .../net/osmand/aidl/search/SearchParams.java | 91 ++ .../net/osmand/aidl/search/SearchResult.aidl | 3 + .../net/osmand/aidl/search/SearchResult.java | 96 ++ .../net/osmand/aidl/tiles/ASqliteDbFile.aidl | 3 + .../net/osmand/aidl/tiles/ASqliteDbFile.java | 69 ++ 150 files changed, 6120 insertions(+) create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlCallback.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlInterface.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/calculateroute/CalculateRouteParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/calculateroute/CalculateRouteParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/contextmenu/AContextMenuButton.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/contextmenu/AContextMenuButton.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/contextmenu/ContextMenuButtonsParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/contextmenu/ContextMenuButtonsParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/contextmenu/RemoveContextMenuButtonsParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/contextmenu/RemoveContextMenuButtonsParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/contextmenu/UpdateContextMenuButtonsParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/contextmenu/UpdateContextMenuButtonsParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/copyfile/CopyFileParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/copyfile/CopyFileParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/customization/CustomizationInfoParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/customization/CustomizationInfoParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsInfoParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsInfoParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/customization/SetWidgetsParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/customization/SetWidgetsParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/favorite/AFavorite.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/favorite/AFavorite.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/favorite/AddFavoriteParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/favorite/AddFavoriteParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/favorite/RemoveFavoriteParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/favorite/RemoveFavoriteParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/favorite/UpdateFavoriteParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/favorite/UpdateFavoriteParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AFavoriteGroup.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AFavoriteGroup.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AddFavoriteGroupParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AddFavoriteGroupParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/favorite/group/RemoveFavoriteGroupParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/favorite/group/RemoveFavoriteGroupParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/favorite/group/UpdateFavoriteGroupParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/favorite/group/UpdateFavoriteGroupParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxBitmap.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxBitmap.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFile.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFile.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFileDetails.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFileDetails.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/ASelectedGpxFile.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/ASelectedGpxFile.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/CreateGpxBitmapParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/CreateGpxBitmapParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/GpxColorParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/GpxColorParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/HideGpxParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/HideGpxParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/ImportGpxParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/ImportGpxParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/RemoveGpxParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/RemoveGpxParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/ShowGpxParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/ShowGpxParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/StartGpxRecordingParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/StartGpxRecordingParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/StopGpxRecordingParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/gpx/StopGpxRecordingParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/map/ALatLon.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/map/ALatLon.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/map/SetMapLocationParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/map/SetMapLocationParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/maplayer/AMapLayer.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/maplayer/AMapLayer.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/maplayer/AddMapLayerParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/maplayer/AddMapLayerParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/maplayer/RemoveMapLayerParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/maplayer/RemoveMapLayerParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/maplayer/UpdateMapLayerParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/maplayer/UpdateMapLayerParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AMapPoint.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AMapPoint.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AddMapPointParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AddMapPointParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/RemoveMapPointParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/RemoveMapPointParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/ShowMapPointParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/ShowMapPointParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/UpdateMapPointParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/UpdateMapPointParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AMapMarker.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AMapMarker.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AddMapMarkerParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AddMapMarkerParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/mapmarker/RemoveMapMarkerParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/mapmarker/RemoveMapMarkerParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/mapmarker/RemoveMapMarkersParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/mapmarker/RemoveMapMarkersParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/mapmarker/UpdateMapMarkerParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/mapmarker/UpdateMapMarkerParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/mapwidget/AMapWidget.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/mapwidget/AMapWidget.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/mapwidget/AddMapWidgetParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/mapwidget/AddMapWidgetParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/mapwidget/RemoveMapWidgetParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/mapwidget/RemoveMapWidgetParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/mapwidget/UpdateMapWidgetParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/mapwidget/UpdateMapWidgetParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerFooterParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerFooterParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerHeaderParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerHeaderParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerItem.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerItem.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navdrawer/SetNavDrawerItemsParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navdrawer/SetNavDrawerItemsParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/ADirectionInfo.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/ADirectionInfo.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationUpdateParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationUpdateParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationVoiceRouterMessageParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationVoiceRouterMessageParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/MuteNavigationParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/MuteNavigationParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateGpxParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateGpxParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateSearchParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateSearchParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/OnVoiceNavigationParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/OnVoiceNavigationParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/PauseNavigationParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/PauseNavigationParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/ResumeNavigationParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/ResumeNavigationParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/StopNavigationParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/StopNavigationParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/UnmuteNavigationParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/navigation/UnmuteNavigationParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/note/StartAudioRecordingParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/note/StartAudioRecordingParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/note/StartVideoRecordingParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/note/StartVideoRecordingParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/note/StopRecordingParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/note/StopRecordingParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/note/TakePhotoNoteParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/note/TakePhotoNoteParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/plugins/PluginParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/plugins/PluginParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/search/SearchParams.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/search/SearchParams.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/search/SearchResult.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/search/SearchResult.java create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/tiles/ASqliteDbFile.aidl create mode 100644 OsmAnd-telegram/src/net/osmand/aidl/tiles/ASqliteDbFile.java diff --git a/OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlCallback.aidl b/OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlCallback.aidl new file mode 100644 index 0000000000..f15fe8f44b --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlCallback.aidl @@ -0,0 +1,54 @@ +package net.osmand.aidl; + +import net.osmand.aidl.search.SearchResult; +import net.osmand.aidl.gpx.AGpxBitmap; +import net.osmand.aidl.navigation.ADirectionInfo; +import net.osmand.aidl.navigation.OnVoiceNavigationParams; + +interface IOsmAndAidlCallback { + + /** + * Callback for search requests. + * + * @return resultSet - set of SearchResult + */ + void onSearchComplete(in List resultSet); + + /** + * Callback for {@link IOsmAndAidlInterface} registerForUpdates() method. + */ + void onUpdate(); + + /** + * Callback for {@link IOsmAndAidlInterface} registerForOsmandInitListener() method. + */ + void onAppInitialized(); + + /** + * Callback for {@link IOsmAndAidlInterface} getBitmapForGpx() method. + * + * @return bitmap - snapshot image of gpx track on map + */ + void onGpxBitmapCreated(in AGpxBitmap bitmap); + + /** + * Callback for {@link IOsmAndAidlInterface} registerForNavigationUpdates() method. + * + * @return directionInfo - update on distance to next turn and turns type. + */ + void updateNavigationInfo(in ADirectionInfo directionInfo); + + /** + * Callback for {@link IOsmAndAidlInterface} buttons set with addContextMenuButtons() method. + * + * @param buttonId - id of custom button + * @param pointId - id of point button associated with + * @param layerId - id of layer point and button associated with + */ + void onContextMenuButtonClicked(in int buttonId, String pointId, String layerId); + + /** + * Callback for {@link IOsmAndAidlInterface} registerForVoiceRouterMessages() method. + */ + void onVoiceRouterNotify(in OnVoiceNavigationParams params); +} \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlInterface.aidl b/OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlInterface.aidl new file mode 100644 index 0000000000..541194e18d --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlInterface.aidl @@ -0,0 +1,849 @@ +package net.osmand.aidl; + +import net.osmand.aidl.map.ALatLon; +import net.osmand.aidl.map.SetMapLocationParams; + +import net.osmand.aidl.favorite.group.AFavoriteGroup; +import net.osmand.aidl.favorite.group.AddFavoriteGroupParams; +import net.osmand.aidl.favorite.group.RemoveFavoriteGroupParams; +import net.osmand.aidl.favorite.group.UpdateFavoriteGroupParams; + +import net.osmand.aidl.favorite.AFavorite; +import net.osmand.aidl.favorite.AddFavoriteParams; +import net.osmand.aidl.favorite.RemoveFavoriteParams; +import net.osmand.aidl.favorite.UpdateFavoriteParams; + +import net.osmand.aidl.mapmarker.AMapMarker; +import net.osmand.aidl.mapmarker.AddMapMarkerParams; +import net.osmand.aidl.mapmarker.RemoveMapMarkerParams; +import net.osmand.aidl.mapmarker.UpdateMapMarkerParams; + +import net.osmand.aidl.calculateroute.CalculateRouteParams; + +import net.osmand.aidl.gpx.ImportGpxParams; +import net.osmand.aidl.gpx.ShowGpxParams; +import net.osmand.aidl.gpx.StartGpxRecordingParams; +import net.osmand.aidl.gpx.StopGpxRecordingParams; +import net.osmand.aidl.gpx.HideGpxParams; +import net.osmand.aidl.gpx.ASelectedGpxFile; + +import net.osmand.aidl.mapwidget.AMapWidget; +import net.osmand.aidl.mapwidget.AddMapWidgetParams; +import net.osmand.aidl.mapwidget.RemoveMapWidgetParams; +import net.osmand.aidl.mapwidget.UpdateMapWidgetParams; + +import net.osmand.aidl.maplayer.point.AMapPoint; +import net.osmand.aidl.maplayer.point.AddMapPointParams; +import net.osmand.aidl.maplayer.point.RemoveMapPointParams; +import net.osmand.aidl.maplayer.point.UpdateMapPointParams; +import net.osmand.aidl.maplayer.AMapLayer; +import net.osmand.aidl.maplayer.AddMapLayerParams; +import net.osmand.aidl.maplayer.RemoveMapLayerParams; +import net.osmand.aidl.maplayer.UpdateMapLayerParams; + +import net.osmand.aidl.navigation.NavigateParams; +import net.osmand.aidl.navigation.NavigateGpxParams; + +import net.osmand.aidl.note.TakePhotoNoteParams; +import net.osmand.aidl.note.StartVideoRecordingParams; +import net.osmand.aidl.note.StartAudioRecordingParams; +import net.osmand.aidl.note.StopRecordingParams; + +import net.osmand.aidl.gpx.RemoveGpxParams; + +import net.osmand.aidl.maplayer.point.ShowMapPointParams; + +import net.osmand.aidl.navdrawer.SetNavDrawerItemsParams; +import net.osmand.aidl.navdrawer.NavDrawerFooterParams; +import net.osmand.aidl.navdrawer.NavDrawerHeaderParams; + +import net.osmand.aidl.navigation.PauseNavigationParams; +import net.osmand.aidl.navigation.ResumeNavigationParams; +import net.osmand.aidl.navigation.StopNavigationParams; +import net.osmand.aidl.navigation.MuteNavigationParams; +import net.osmand.aidl.navigation.UnmuteNavigationParams; + +import net.osmand.aidl.IOsmAndAidlCallback; + +import net.osmand.aidl.search.SearchResult; +import net.osmand.aidl.search.SearchParams; +import net.osmand.aidl.navigation.NavigateSearchParams; + +import net.osmand.aidl.customization.SetWidgetsParams; +import net.osmand.aidl.customization.OsmandSettingsParams; +import net.osmand.aidl.customization.OsmandSettingsInfoParams; +import net.osmand.aidl.customization.CustomizationInfoParams; + +import net.osmand.aidl.gpx.AGpxFile; +import net.osmand.aidl.gpx.AGpxFileDetails; +import net.osmand.aidl.gpx.CreateGpxBitmapParams; +import net.osmand.aidl.gpx.GpxColorParams; + +import net.osmand.aidl.tiles.ASqliteDbFile; + +import net.osmand.aidl.plugins.PluginParams; +import net.osmand.aidl.copyfile.CopyFileParams; + +import net.osmand.aidl.navigation.ANavigationUpdateParams; +import net.osmand.aidl.navigation.ANavigationVoiceRouterMessageParams; + +import net.osmand.aidl.contextmenu.ContextMenuButtonsParams; +import net.osmand.aidl.contextmenu.UpdateContextMenuButtonsParams; +import net.osmand.aidl.contextmenu.RemoveContextMenuButtonsParams; + +import net.osmand.aidl.mapmarker.RemoveMapMarkersParams; + +// NOTE: Add new methods at the end of file!!! + +interface IOsmAndAidlInterface { + + /** + * Add map marker at given location. + * + * @param lat (double) - latitude. + * @param lon (double) - longitude. + * @param name (String)- name of marker. + */ + boolean addMapMarker(in AddMapMarkerParams params); + + /** + * Remove map marker. + * + * If ignoreCoordinates is false the marker is only removed if lat/lon match the currently set values of the marker. + * If ignoreCoordinates is true the marker is removed if the name matches, the values of lat/lon are ignored. + * + * @param lat (double) - latitude. + * @param lon (double) - longitude. + * @param name (String)- name of marker. + * @param ignoreCoordinates (boolean) - flag to determine whether lat/lon shall be ignored + */ + boolean removeMapMarker(in RemoveMapMarkerParams params); + + /** + * Update map marker. + * + * If ignoreCoordinates is false the marker gets updated only if latPrev/lonPrev match the currently set values of the marker. + * If ignoreCoordinates is true the marker gets updated if the name matches, the values of latPrev/lonPrev are ignored. + * + * @param latPrev (double) - latitude (current marker). + * @param lonPrev (double) - longitude (current marker). + * @param namePrev (String) - name (current marker). + * @param latNew (double) - latitude (new marker). + * @param lonNew (double) - longitude (new marker). + * @param nameNew (String) - name (new marker). + * @param ignoreCoordinates (boolean) - flag to determine whether latPrev/lonPrev shall be ignored + */ + boolean updateMapMarker(in UpdateMapMarkerParams params); + + /** + * Add map widget to the right side of the main screen. + * Note: any specified icon should exist in OsmAnd app resources. + * + * @param id (String) - widget id. + * @param menuIconName (String) - icon name (configure map menu). + * @param menuTitle (String) - widget name (configure map menu). + * @param lightIconName (String) - icon name for the light theme (widget). + * @param darkIconName (String) - icon name for the dark theme (widget). + * @param text (String) - main widget text. + * @param description (String) - sub text, like "km/h". + * @param order (int) - order position in the widgets list. + * @param intentOnClick (String) - onClick intent. Called after click on widget as startActivity(Intent intent). + */ + boolean addMapWidget(in AddMapWidgetParams params); + + /** + * Remove map widget. + * + * @param (String) id - widget id. + */ + boolean removeMapWidget(in RemoveMapWidgetParams params); + + /** + * Update map widget. + * Note: any specified icon should exist in OsmAnd app resources. + * + * @param id (String) - widget id. + * @param menuIconName (String) - icon name (configure map menu). + * @param menuTitle (String) - widget name (configure map menu). + * @param lightIconName (String) - icon name for the light theme (widget). + * @param darkIconName (String) - icon name for the dark theme (widget). + * @param text (String) - main widget text. + * @param description (String) - sub text, like "km/h". + * @param order (int) - order position in the widgets list. + * @param intentOnClick (String) - onClick intent. Called after click on widget as startActivity(Intent intent). + */ + boolean updateMapWidget(in UpdateMapWidgetParams params); + + /** + * Add point to user layer. + * + * @param layerId (String) - layer id. Note: layer should be added first. + * @param pointId (String) - point id. + * @param shortName (String) - short name (single char). Displayed on the map. + * @param fullName (String) - full name. Displayed in the context menu on first row. + * @param typeName (String) - type name. Displayed in context menu on second row. + * @param color (int) - color of circle's background. + * @param location (ALatLon) - location of the point. + * @param details (List)- list of details. Displayed under context menu. + * @param params (Map) - optional map of params for point. + */ + boolean addMapPoint(in AddMapPointParams params); + + + /** + * Remove point. + * + * @param layerId (String) - layer id. + * @param pointId (String) - point id. + */ + boolean removeMapPoint(in RemoveMapPointParams params); + + /** + * Update point. + * + * @param layerId (String) - layer id. + * @param pointId (String) - point id. + * @param updateOpenedMenuAndMap (boolean) - flag to enable folowing mode and menu updates for point + * @param shortName (String) - short name (single char). Displayed on the map. + * @param fullName (String) - full name. Displayed in the context menu on first row. + * @param typeName (String) - type name. Displayed in context menu on second row. + * @param color (String) - color of circle's background. + * @param location (ALatLon)- location of the point. + * @param details (List) - list of details. Displayed under context menu. + * @param params (Map) - optional map of params for point. + */ + boolean updateMapPoint(in UpdateMapPointParams params); + + /** + * Add user layer on the map. + * + * @param id (String) - layer id. + * @param name (String) - layer name. + * @param zOrder (float) - z-order position of layer. Default value is 5.5f + * @param points Map - initial list of points. Nullable. + * @param imagePoints (boolean) - use new style for points on map or not. Also default zoom bounds for new style can be edited. + */ + boolean addMapLayer(in AddMapLayerParams params); + + /** + * Remove user layer. + * + * @param id (String) - layer id. + */ + boolean removeMapLayer(in RemoveMapLayerParams params); + + /** + * Update user layer. + * + * @param id (String) - layer id. + * @param name (String) - layer name. + * @param zOrder (float) - z-order position of layer. Default value is 5.5f + * @param points Map - list of points. Nullable. + * @param imagePoints (boolean) - use new style for points on map or not. Also default zoom bounds for new style can be edited. + */ + boolean updateMapLayer(in UpdateMapLayerParams params); + + /** + * Import GPX file to OsmAnd (from URI or file). + * + * @param gpxUri (Uri) - URI created by FileProvider (preferable method). + * @param file (File) - File which represents GPX track (not recomended, OsmAnd should have rights to access file location). + * @param fileName (String) - Destination file name. May contain dirs. + * @param color (String) - color of gpx. Can be one of: "red", "orange", "lightblue", "blue", "purple", + * "translucent_red", "translucent_orange", "translucent_lightblue", + * "translucent_blue", "translucent_purple" + * @param show (boolean) - show track on the map after import + */ + boolean importGpx(in ImportGpxParams params); + + /** + * Show GPX file on map. + * + * @param fileName (String) - file name to show. Must be imported first. + */ + boolean showGpx(in ShowGpxParams params); + + /** + * Hide GPX file. + * + * @param fileName (String) - file name to hide. + */ + boolean hideGpx(in HideGpxParams params); + + /** + * Get list of active GPX files. + * + * @return list of active gpx files. + */ + boolean getActiveGpx(out List files); + + /** + * Set map view to current location. + * + * @param latitude (double) - latitude of new map center. + * @param longitude (double) - longitude of new map center. + * @param zoom (float) - map zoom level. Set 0 to keep zoom unchanged. + * @param animated (boolean) - set true to animate changes. + */ + boolean setMapLocation(in SetMapLocationParams params); + + + boolean calculateRoute(in CalculateRouteParams params); + + /** + * Refresh the map (UI) + */ + boolean refreshMap(); + + /** + * Add favorite group with given params. + * + * @param name (String) - group name. + * @param color (String) - group color. Can be one of: "red", "orange", "yellow", + * "lightgreen", "green", "lightblue", "blue", "purple", "pink", "brown". + * @param visible (boolean) - group visibility. + */ + boolean addFavoriteGroup(in AddFavoriteGroupParams params); + + /** + * Update favorite group with given params. + * + * @param namePrev (String) - group name (current). + * @param colorPrev (String) - group color (current). + * @param visiblePrev (boolean) - group visibility (current). + * @param nameNew (String) - group name (new). + * @param colorNew (String) - group color (new). + * @param visibleNew (boolean) - group visibility (new). + */ + boolean removeFavoriteGroup(in RemoveFavoriteGroupParams params); + + /** + * Remove favorite group with given name. + * + * @param name (String) - name of favorite group. + */ + boolean updateFavoriteGroup(in UpdateFavoriteGroupParams params); + + /** + * Add favorite at given location with given params. + * + * @param lat (double) - latitude. + * @param lon (double) - longitude. + * @param name (String) - name of favorite item. + * @param description (String) - description of favorite item. + * @param category (String) - category of favorite item. + * @param color (String) - color of favorite item. Can be one of: "red", "orange", "yellow", + * "lightgreen", "green", "lightblue", "blue", "purple", "pink", "brown". + * @param visible (boolean) - should favorite item be visible after creation. + */ + boolean addFavorite(in AddFavoriteParams params); + + /** + * Update favorite at given location with given params. + * + * @param latPrev (double) - latitude (current favorite). + * @param lonPrev (double) - longitude (current favorite). + * @param namePrev (String) - name of favorite item (current favorite). + * @param categoryPrev (String) - category of favorite item (current favorite). + * @param latNew (double) - latitude (new favorite). + * @param lonNew (double) - longitude (new favorite). + * @param nameNew (String) - name of favorite item (new favorite). + * @param descriptionNew (String) - description of favorite item (new favorite). + * @param categoryNew (String) - category of favorite item (new favorite). Use only to create a new category, + * not to update an existing one. If you want to update an existing category, + * use the {@link #updateFavoriteGroup(String, String, boolean, String, String, boolean)} method. + * @param colorNew (String) - color of new category. Can be one of: "red", "orange", "yellow", + * "lightgreen", "green", "lightblue", "blue", "purple", "pink", "brown". + * @param visibleNew (boolean) - should new category be visible after creation. + */ + boolean removeFavorite(in RemoveFavoriteParams params); + + /** + * Remove favorite at given location with given params. + * + * @param lat (double) - latitude. + * @param lon (double) - longitude. + * @param name (String) - name of favorite item. + * @param category (String) - category of favorite item. + */ + boolean updateFavorite(in UpdateFavoriteParams params); + + /** + * Start gpx recording. + */ + boolean startGpxRecording(in StartGpxRecordingParams params); + + /** + * Stop gpx recording. + */ + boolean stopGpxRecording(in StopGpxRecordingParams params); + + /** + * Take photo note. + * + * @param lat (double) - latutude of photo note. + * @param lon (double) - longitude of photo note. + */ + boolean takePhotoNote(in TakePhotoNoteParams params); + + /** + * Start video note recording. + * + * @param lat (double) - latutude of video note point. + * @param lon (double) - longitude of video note point. + */ + boolean startVideoRecording(in StartVideoRecordingParams params); + + /** + * Start audio note recording. + * + * @param lat (double) - latutude of audio note point. + * @param lon (double) - longitude of audio note point. + */ + boolean startAudioRecording(in StartAudioRecordingParams params); + + /** + * Stop Audio/Video recording. + */ + boolean stopRecording(in StopRecordingParams params); + + /** + * Start navigation. + * + * @param startName (String) - name of the start point as it displays in OsmAnd's UI. Nullable. + * @param startLat (double) - latitude of the start point. If 0 - current location is used. + * @param startLon (double) - longitude of the start point. If 0 - current location is used. + * @param destName (String) - name of the start point as it displays in OsmAnd's UI. + * @param destLat (double) - latitude of a destination point. + * @param destLon (double) - longitude of a destination point. + * @param profile (String) - One of: "default", "car", "bicycle", "pedestrian", "aircraft", "boat", "hiking", "motorcycle", "truck". Nullable (default). + * @param force (boolean) - ask to stop current navigation if any. False - ask. True - don't ask. + */ + boolean navigate(in NavigateParams params); + + /** + * Start navigation using gpx file. User need to grant Uri permission to OsmAnd. + * + * @param gpxUri (Uri) - URI created by FileProvider. + * @param force (boolean) - ask to stop current navigation if any. False - ask. True - don't ask. + */ + boolean navigateGpx(in NavigateGpxParams params); + + /** + * Remove GPX file. + * + * @param fileName (String) - file name to remove; + */ + boolean removeGpx(in RemoveGpxParams params); + + + /** + * Show AMapPoint on map in OsmAnd. + * + * @param layerId (String) - layer id. Note: layer should be added first. + * @param pointId (String) - point id. + * @param shortName (String) - short name (single char). Displayed on the map. + * @param fullName (String) - full name. Displayed in the context menu on first row. + * @param typeName (String) - type name. Displayed in context menu on second row. + * @param color (int) - color of circle's background. + * @param location (ALatLon) - location of the point. + * @param details List - list of details. Displayed under context menu. + * @param params Map - optional map of params for point. + */ + boolean showMapPoint(in ShowMapPointParams params); + + /** + * Method for adding up to 3 items to the OsmAnd navigation drawer. + * + * @param appPackage - current application package. + * @param names - list of names for items. + * @param uris - list of uris for intents. + * @param iconNames - list of icon names for items. + * @param flags - list of flags for intents. Use -1 if no flags needed. + */ + boolean setNavDrawerItems(in SetNavDrawerItemsParams params); + + /** + * Put navigation on pause. + */ + boolean pauseNavigation(in PauseNavigationParams params); + + /** + * Resume navigation if it was paused before. + */ + boolean resumeNavigation(in ResumeNavigationParams params); + + /** + * Stop navigation. Removes target / intermediate points and route path from the map. + */ + boolean stopNavigation(in StopNavigationParams params); + + + /** + * Mute voice guidance. Stays muted until unmute manually or via the api. + */ + boolean muteNavigation(in MuteNavigationParams params); + + /** + * Unmute voice guidance. + */ + boolean unmuteNavigation(in UnmuteNavigationParams params); + + /** + * Run search for POI / Address. + * + * @param searchQuery (String) - search query string. + * @param searchType (int) - type of search. Values: + * SearchParams.SEARCH_TYPE_ALL - all kind of search + * SearchParams.SEARCH_TYPE_POI - POIs only + * SearchParams.SEARCH_TYPE_ADDRESS - addresses only + * + * @param latitude (double) - latitude of original search location. + * @param longitude (double) - longitude of original search location. + * @param radiusLevel (int) - value from 1 to 7. Default value = 1. + * @param totalLimit (int) - limit of returned search result rows. Default value = -1 (unlimited). + */ + boolean search(in SearchParams params, IOsmAndAidlCallback callback); + + /** + * Do search and start navigation. + * + * @param startName (String) - name of the start point as it displays in OsmAnd's UI. Nullable. + * @param startLat (double) - latitude of the start point. If 0 - current location is used. + * @param startLon (double) - longitude of the start point. If 0 - current location is used. + * @param searchQuery (String) - Text of a query for searching a destination point. Sent as URI parameter. + * @param searchLat (double) - original location of search (latitude). Sent as URI parameter. + * @param searchLon (double) - original location of search (longitude). Sent as URI parameter. + * @param profile (String) - one of: "default", "car", "bicycle", "pedestrian", "aircraft", "boat", "hiking", "motorcycle", "truck". Nullable (default). + * @param force (boolean) - ask to stop current navigation if any. False - ask. True - don't ask. + */ + boolean navigateSearch(in NavigateSearchParams params); + + /** + * Method to register for periodical callbacks from OsmAnd + * + * @param updateTimeMS (long)- period of time in millisecond after which callback is triggered + * @param callback (IOsmAndCallback)- create and provide instance of {@link IOsmAndAidlCallback} interface + * @return id (long) - id of callback in OsmAnd. Needed to unsubscribe from updates. + */ + long registerForUpdates(in long updateTimeMS, IOsmAndAidlCallback callback); + + /** + * Method to unregister from periodical callbacks from OsmAnd + * + * @param callbackId (long)- id of registered callback (provided by OsmAnd + * in {@link OsmAndAidlHelper#registerForUpdates(long, IOsmAndAidlCallback)}) + */ + boolean unregisterFromUpdates(in long callbackId); + + /** + * Method for adding image to the top of Osmand's NavDrawer. + * + * @param imageUri (String)- image's URI.toString + * + * @deprecated + * Use the {@link #setNavDrawerLogoWithParams(NavDrawerHeaderParams params)} method. + */ + boolean setNavDrawerLogo(in String imageUri); + + /** + * Method for selected UI elements (like QuickSearch button) to show. + * + * @param ids (List)- list of menu items keys from {@link OsmAndCustomizationConstants} + */ + boolean setEnabledIds(in List ids); + + /** + * Method for selected UI elements (like QuickSearch button) to hide. + * + * @param ids (List)- list of menu items keys from {@link OsmAndCustomizationConstants} + */ + boolean setDisabledIds(in List ids); + + /** + * Method to show selected NavDrawer's menu items. + * + * @param patterns (List) - list of menu items names from {@link OsmAndCustomizationConstants} + */ + boolean setEnabledPatterns(in List patterns); + + /** + * Method to hide selected NavDrawer's menu items. + * + * @param patterns (List)- list of menu items names from {@link OsmAndCustomizationConstants} + */ + boolean setDisabledPatterns(in List patterns); + + /** + * Register OsmAnd widgets for visibility. + * + * @param widgetKey ()- widget id. + * @param appModKeys - list of OsmAnd Application modes widget active with. Could be "null" for all modes. + */ + boolean regWidgetVisibility(in SetWidgetsParams params); + + /** + * Register OsmAnd widgets for availability. + * + * @param widgetKey (String) - widget id. + * @param appModKeys (List)- ist of OsmAnd Application modes widget active with. Could be "null" for all modes. + */ + boolean regWidgetAvailability(in SetWidgetsParams params); + + /** + * Add custom parameters for OsmAnd settings to associate with client app. + * + * @param sharedPreferencesName (String)- string with name of clint's app for shared preferences key + * @param bundle (Bundle)- bundle with keys from Settings IDs {@link OsmAndCustomizationConstants} and Settings params + */ + boolean customizeOsmandSettings(in OsmandSettingsParams params); + + /** + * Method to get list of gpx files currently registered (imported or created) in OsmAnd; + * + * @return list of gpx files + */ + boolean getImportedGpx(out List files); + + /** + * Method to get list of sqlitedb files registered in OsmAnd; + * + * @return list of sqlitedb files + */ + boolean getSqliteDbFiles(out List files); + + /** + * Method to get list of currently active sqlitedb files + * + * @return list of sqlitedb files + */ + boolean getActiveSqliteDbFiles(out List files); + + /** + * Method to show selected sqlitedb file as map overlay. + * + * @param fileName (String) - name of sqlitedb file + */ + boolean showSqliteDbFile(String fileName); + + /** + * Method to hide sqlitedb file from map overlay. + * + * @param fileName (String) - name of sqlitedb file + */ + boolean hideSqliteDbFile(String fileName); + + /** + * Method for adding image to the top of OsmAnd's NavDrawer with additional params + * + * @param imageUri (String) - image's URI.toString + * @param packageName (String) - client's app package name + * @param intent (String) - intent for additional functionality on image click + * + */ + boolean setNavDrawerLogoWithParams(in NavDrawerHeaderParams params); + + /** + * Method for adding functionality to "Powered by Osmand" logo in NavDrawer's footer + * (reset OsmAnd settings to pre-clinet app's state) + * + * @param packageName (String) - package name + * @param intent (String) - intent + * @param appName (String) - client's app name + */ + boolean setNavDrawerFooterWithParams(in NavDrawerFooterParams params); + + /** + * Restore default (pre-client) OsmAnd settings and state: + * clears features, widgets and settings customization, NavDraw logo. + */ + boolean restoreOsmand(); + + /** + * Method to change state of plug-ins in OsmAnd. + * + * @param pluginId (String) - id (name) of plugin. + * @param newState (int) - new state (0 - off, 1 - on). + */ + boolean changePluginState(in PluginParams params); + + /** + * Method to register for callback on OsmAnd initialization + * @param callback (IOsmAndAidlCallback) - create and provide instance of {@link IOsmAndAidlCallback} interface + */ + boolean registerForOsmandInitListener(in IOsmAndAidlCallback callback); + + /** + * Requests bitmap snap-shot of map with GPX file from provided URI in its center. + * You can set bitmap size, density and GPX lines color, but you need + * to manually download appropriate map in OsmAnd or background will be empty. + * Bitmap will be returned through callback {@link IOsmAndAidlCallback#onGpxBitmapCreated(AGpxBitmap)} + * + * @param gpxUri (Uri/File) - Uri for gpx file + * @param density (float) - image density. Recommended to use default metrics for device's display. + * @param widthPixels (int) - width of bitmap + * @param heightPixels (int) - height of bitmap + * @param color (int) - color in ARGB format + * @param callback (IOsmAndAidlCallback) - instance of callback from OsmAnd. + */ + boolean getBitmapForGpx(in CreateGpxBitmapParams file, IOsmAndAidlCallback callback); + + /** + * Method to copy files to OsmAnd part by part. For now supports only sqlitedb format. + * Part size (bytearray) should not exceed 256k. + * + * @param fileName (String) - name of file + * @param filePartData (byte[]) - parts of file, byte[] with size 256k or less. + * @param startTime (long) - timestamp of copying start. + * @param isDone (boolean) - boolean to mark end of copying. + * @return number of last successfully received file part or error(-1). + */ + int copyFile(in CopyFileParams filePart); + + /** + * Method to register for updates during navgation. Notifies user about distance to the next turn and its type. + * + * @param subscribeToUpdates (boolean) - subscribe or unsubscribe from updates + * @param callbackId (long) - id of callback, needed to unsubscribe from updates + * @param callback (IOsmAndAidlCallback) - callback to notify user on navigation data change + */ + long registerForNavigationUpdates(in ANavigationUpdateParams params, IOsmAndAidlCallback callback); + + /** + * Method to add Context Menu buttons to OsmAnd Context menu. + * + * {@link ContextMenuButtonsParams } is a wrapper class for params: + * + * @param leftButton (AContextMenuButton) - parameters for left context button: + * @param buttonId (String at AContextMenuButton) - id of button in View + * @param leftTextCaption (String at AContextMenuButton) - left-side button text + * @param rightTextCaption (String at AContextMenuButton) - right-side button text + * @param String leftIconName (String at AContextMenuButton) - name of left-side icon + * @param String rightIconName (String at AContextMenuButton) - name of right-side icon + * @param boolean needColorizeIcon (booleanat AContextMenuButton) - flag to apply color to icon + * @param boolean enabled (boolean at AContextMenuButton) - enable button flag + * + * @param rightButton (AContextMenuButton) - parameters for right context button, see leftButton param for details. + * @param id (String) - button id; + * @param appPackage (String) - clinet's app package name + * @param layerId (String) - id of Osmand's map layer + * @param callbackId (long) - {@link IOsmAndAidlCallback} id + * @param pointsIds (List) - list of point Ids to which this rules applies to. + * + * @param callback (IOsmAndAidlCallback) - AIDL callback; + * + * @return long - callback's Id; + */ + long addContextMenuButtons(in ContextMenuButtonsParams params, IOsmAndAidlCallback callback); + + /** + * Method to remove Context Menu buttons from OsmAnd Context menu. + * + * {@link RemoveContextMenuButtonsParams} is a wrapper class for params: + * + * @param paramsId (String) - id of {@link ContextMenuButtonsParams} of button you want to remove; + * @param callbackId (long) - id of {@ling IOsmAndAidlCallback} of button you want to remove; + * + */ + boolean removeContextMenuButtons(in RemoveContextMenuButtonsParams params); + + /** + * Method to update params on already set custom Context Button. + * + * {@link UpdateContextMenuButtonsParams } is a wrapper class for params: + * + * @param leftButton (AContextMenuButton) - parameters for left context button: + * @param buttonId (String at AContextMenuButton) - id of button in View + * @param leftTextCaption (String at AContextMenuButton) - left-side button text + * @param rightTextCaption (String at AContextMenuButton) - right-side button text + * @param String leftIconName (String at AContextMenuButton) - name of left-side icon + * @param String rightIconName (String at AContextMenuButton) - name of right-side icon + * @param boolean needColorizeIcon (booleanat AContextMenuButton) - flag to apply color to icon + * @param boolean enabled (boolean at AContextMenuButton) - enable button flag + * + * @param rightButton (AContextMenuButton) - parameters for right context button, see leftButton param for details. + * @param id (String) - button id; + * @param appPackage (String) - clinet's app package name + * @param layerId (String) - id of Osmand's map layer + * @param callbackId (long) - {@link IOsmAndAidlCallback} id + * @param pointsIds (List) - list of point Ids to which this rules applies to. + * + */ + boolean updateContextMenuButtons(in UpdateContextMenuButtonsParams params); + + /** + * Method to check if there is a customized setting in OsmAnd Settings. + * + * {@link OsmandSettingsInfoParams} is a wrapper class for params: + * + * @param sharedPreferencesName (String at OsmandSettingInfoParams) - key of setting in OsmAnd's preferences. + * + * @return boolean - true if setting is already set in SharedPreferences + * + */ + boolean areOsmandSettingsCustomized(in OsmandSettingsInfoParams params); + + /** + * Method to customize parameters of OsmAnd. + * + * @param params (CustomizationInfoParams) - wrapper class for custom settings and ui. + * + * @param settingsParams (OsmandSettingsParams) - wrapper class for OsmAnd shared preferences params. + * See {@link #customizeOsmandSettings(in OsmandSettingsParams params) customizeOsmandSettings} + * method description for details. + * @param navDrawerHeaderParams (NavDrawerHeaderParams) - wrapper class for OsmAnd navdrawer header params. + * See {@link #setNavDrawerLogoWithParams(in NavDrawerHeaderParams params) setNavDrawerLogoWithParams} + * method description for details. + * @param navDrawerFooterParams (NavDrawerFooterParams) - wrapper class for OsmAnd navdrawer footer params. + * See {@link #setNavDrawerFooterWithParams(in NavDrawerFooterParams params) setNavDrawerFooterWithParams} + * method description for details. + * @param visibilityWidgetsParams (ArrayList) - wrapper class for OsmAnd widgets visibility. + * See {@link #regWidgetVisibility(in SetWidgetsParams params) regWidgetVisibility} + * method description for details. + * @param availabilityWidgetsParams (ArrayList) - wrapper class for OsmAnd widgets availability. + * See {@link #regWidgetAvailability(in SetWidgetsParams params) regWidgetAvailability} + * method description for details. + * @param pluginsParams (ArrayList) - wrapper class for OsmAnd plugins states params. + * See {@link #changePluginState(in PluginParams params) changePluginState} + * method description for details. + * @param featuresEnabledIds (List) - list of UI elements (like QuickSearch button) to show. + * See {@link #setEnabledIds(in List ids) setEnabledIds} + * @param featuresDisabledIds (List) - list of UI elements (like QuickSearch button) to hide. + * See {@link #setDisabledIds(in List ids) setDisabledIds} + * @param featuresEnabledPatterns (List) - list of NavDrawer menu items to show. + * See {@link #setEnabledPatterns(in List patterns) setEnabledPatterns} + * @param featuresDisabledPatterns (List) - list of NavDrawer menu items to hide. + * See {@link #setDisabledPatterns(in List patterns) setDisabledPatterns} + * + */ + boolean setCustomization(in CustomizationInfoParams params); + + /** + * Method to register for Voice Router voice messages during navigation. Notifies user about voice messages. + * + * @params subscribeToUpdates (boolean) - boolean flag to subscribe or unsubscribe from messages + * @params callbackId (long) - id of callback, needed to unsubscribe from messages + * @params callback (IOsmAndAidlCallback) - callback to notify user on voice message + */ + long registerForVoiceRouterMessages(in ANavigationVoiceRouterMessageParams params, IOsmAndAidlCallback callback); + + /** + * Removes all active map markers (marks them as passed and moves to history) + * Empty class of params + */ + boolean removeAllActiveMapMarkers(in RemoveMapMarkersParams params); + + /** + * Method to get color name for gpx. + * + * @param fileName (String) - name of gpx file. + * + * @param gpxColor (String) - color name of gpx. Can be one of: "red", "orange", "lightblue", + * "blue", "purple", "translucent_red", "translucent_orange", + * "translucent_lightblue", "translucent_blue", "translucent_purple" + * Which used in {@link #importGpx(in ImportGpxParams params) importGpx} + * Or color hex if gpx has custom color. + * + */ + boolean getGpxColor(inout GpxColorParams params); +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/calculateroute/CalculateRouteParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/calculateroute/CalculateRouteParams.aidl new file mode 100644 index 0000000000..017dd5e944 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/calculateroute/CalculateRouteParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.calculateroute; + +parcelable CalculateRouteParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/calculateroute/CalculateRouteParams.java b/OsmAnd-telegram/src/net/osmand/aidl/calculateroute/CalculateRouteParams.java new file mode 100644 index 0000000000..3cc660ec8a --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/calculateroute/CalculateRouteParams.java @@ -0,0 +1,100 @@ +package net.osmand.aidl.calculateroute; + +import android.os.Parcel; +import android.os.Parcelable; + +import net.osmand.aidl.map.ALatLon; + +import java.util.ArrayList; +import java.util.List; + +public class CalculateRouteParams implements Parcelable { + + private ALatLon startPoint; + private String startPointName; + private ALatLon endPoint; + private String endPointName; + private List intermediatePoints = new ArrayList<>(); + private List intermediateNames = new ArrayList<>(); + + public CalculateRouteParams(ALatLon startPoint, String startPointName, + ALatLon endPoint, String endPointName, + List intermediatePoints, List intermediateNames) { + + if (endPoint == null) { + throw new IllegalArgumentException("endPoint cannot be null"); + } + + this.startPoint = startPoint; + this.startPointName = startPointName; + this.endPoint = endPoint; + this.endPointName = endPointName; + if (intermediatePoints != null) { + this.intermediatePoints.addAll(intermediatePoints); + } + if (intermediateNames != null) { + this.intermediateNames.addAll(intermediateNames); + } + } + + public CalculateRouteParams(Parcel in) { + readFromParcel(in); + } + + public static final Parcelable.Creator CREATOR = new + Parcelable.Creator() { + public CalculateRouteParams createFromParcel(Parcel in) { + return new CalculateRouteParams(in); + } + + public CalculateRouteParams[] newArray(int size) { + return new CalculateRouteParams[size]; + } + }; + + public ALatLon getStartPoint() { + return startPoint; + } + + public String getStartPointName() { + return startPointName; + } + + public ALatLon getEndPoint() { + return endPoint; + } + + public String getEndPointName() { + return endPointName; + } + + public List getIntermediatePoints() { + return intermediatePoints; + } + + public List getIntermediateNames() { + return intermediateNames; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeParcelable(startPoint, flags); + out.writeString(startPointName); + out.writeParcelable(endPoint, flags); + out.writeString(endPointName); + out.writeTypedList(intermediatePoints); + out.writeStringList(intermediateNames); + } + + private void readFromParcel(Parcel in) { + startPoint = in.readParcelable(ALatLon.class.getClassLoader()); + startPointName = in.readString(); + endPoint = in.readParcelable(ALatLon.class.getClassLoader()); + endPointName = in.readString(); + in.readTypedList(intermediatePoints, ALatLon.CREATOR); + in.readStringList(intermediateNames); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/AContextMenuButton.aidl b/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/AContextMenuButton.aidl new file mode 100644 index 0000000000..4a8cbee665 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/AContextMenuButton.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.contextmenu; + +parcelable AContextMenuButton; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/AContextMenuButton.java b/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/AContextMenuButton.java new file mode 100644 index 0000000000..b235116999 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/AContextMenuButton.java @@ -0,0 +1,101 @@ +package net.osmand.aidl.contextmenu; + +import android.os.Parcel; +import android.os.Parcelable; + +public class AContextMenuButton implements Parcelable { + + private int buttonId; + + private String leftTextCaption; + private String rightTextCaption; + private String leftIconName; + private String rightIconName; + + private boolean needColorizeIcon; + private boolean enabled; + + public AContextMenuButton(int buttonId, String leftTextCaption, String rightTextCaption, String leftIconName, String rightIconName, boolean needColorizeIcon, boolean enabled) { + this.buttonId = buttonId; + this.leftTextCaption = leftTextCaption; + this.rightTextCaption = rightTextCaption; + this.leftIconName = leftIconName; + this.rightIconName = rightIconName; + this.needColorizeIcon = needColorizeIcon; + this.enabled = enabled; + } + + protected AContextMenuButton(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public AContextMenuButton createFromParcel(Parcel in) { + return new AContextMenuButton(in); + } + + @Override + public AContextMenuButton[] newArray(int size) { + return new AContextMenuButton[size]; + } + }; + + public int getButtonId() { + return buttonId; + } + + public String getLeftTextCaption() { + return leftTextCaption; + } + + public String getRightTextCaption() { + return rightTextCaption; + } + + public String getLeftIconName() { + return leftIconName; + } + + public String getRightIconName() { + return rightIconName; + } + + public boolean isNeedColorizeIcon() { + return needColorizeIcon; + } + + public boolean isEnabled() { + return enabled; + } + + public static Creator getCREATOR() { + return CREATOR; + } + + @Override + public void writeToParcel(Parcel dest, int f) { + dest.writeInt(buttonId); + dest.writeString(leftTextCaption); + dest.writeString(rightTextCaption); + dest.writeString(leftIconName); + dest.writeString(rightIconName); + dest.writeInt(needColorizeIcon ? 1 : 0); + dest.writeInt(enabled ? 1 : 0); + } + + private void readFromParcel(Parcel in) { + buttonId = in.readInt(); + leftTextCaption = in.readString(); + rightTextCaption = in.readString(); + leftIconName = in.readString(); + rightIconName = in.readString(); + needColorizeIcon = in.readInt() != 0; + enabled = in.readInt() != 0; + } + + @Override + public int describeContents() { + return 0; + } +} \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/ContextMenuButtonsParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/ContextMenuButtonsParams.aidl new file mode 100644 index 0000000000..cf05b9db9c --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/ContextMenuButtonsParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.contextmenu; + +parcelable ContextMenuButtonsParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/ContextMenuButtonsParams.java b/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/ContextMenuButtonsParams.java new file mode 100644 index 0000000000..0bdfb25feb --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/ContextMenuButtonsParams.java @@ -0,0 +1,105 @@ +package net.osmand.aidl.contextmenu; + +import android.os.Parcel; +import android.os.Parcelable; + +import java.util.ArrayList; +import java.util.List; + +public class ContextMenuButtonsParams implements Parcelable { + + private AContextMenuButton leftButton; + private AContextMenuButton rightButton; + + private String id; + private String appPackage; + private String layerId; + + private long callbackId = -1L; + + private List pointsIds = new ArrayList<>(); + + public ContextMenuButtonsParams(AContextMenuButton leftButton, AContextMenuButton rightButton, String id, String appPackage, String layerId, long callbackId, List pointsIds) { + this.leftButton = leftButton; + this.rightButton = rightButton; + this.id = id; + this.appPackage = appPackage; + this.layerId = layerId; + this.callbackId = callbackId; + this.pointsIds = pointsIds; + } + + public ContextMenuButtonsParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public ContextMenuButtonsParams createFromParcel(Parcel in) { + return new ContextMenuButtonsParams(in); + } + + @Override + public ContextMenuButtonsParams[] newArray(int size) { + return new ContextMenuButtonsParams[size]; + } + }; + + public AContextMenuButton getLeftButton() { + return leftButton; + } + + public AContextMenuButton getRightButton() { + return rightButton; + } + + public String getId() { + return id; + } + + public String getAppPackage() { + return appPackage; + } + + public String getLayerId() { + return layerId; + } + + public long getCallbackId() { + return callbackId; + } + + public void setCallbackId(long callbackId) { + this.callbackId = callbackId; + } + + public List getPointsIds() { + return pointsIds; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + dest.writeParcelable(leftButton, flags); + dest.writeParcelable(rightButton, flags); + dest.writeString(id); + dest.writeString(appPackage); + dest.writeString(layerId); + dest.writeLong(callbackId); + dest.writeStringList(pointsIds); + } + + private void readFromParcel(Parcel in) { + leftButton = in.readParcelable(AContextMenuButton.class.getClassLoader()); + rightButton = in.readParcelable(AContextMenuButton.class.getClassLoader()); + id = in.readString(); + appPackage = in.readString(); + layerId = in.readString(); + callbackId = in.readLong(); + in.readStringList(pointsIds); + } + + @Override + public int describeContents() { + return 0; + } +} \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/RemoveContextMenuButtonsParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/RemoveContextMenuButtonsParams.aidl new file mode 100644 index 0000000000..557a8e5113 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/RemoveContextMenuButtonsParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.contextmenu; + +parcelable RemoveContextMenuButtonsParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/RemoveContextMenuButtonsParams.java b/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/RemoveContextMenuButtonsParams.java new file mode 100644 index 0000000000..33f3ab400c --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/RemoveContextMenuButtonsParams.java @@ -0,0 +1,53 @@ +package net.osmand.aidl.contextmenu; + +import android.os.Parcel; +import android.os.Parcelable; + +public class RemoveContextMenuButtonsParams implements Parcelable { + + private String paramsId; + + private long callbackId = -1L; + + public RemoveContextMenuButtonsParams(String paramsId, long callbackId) { + this.paramsId = paramsId; + this.callbackId = callbackId; + } + + public RemoveContextMenuButtonsParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + public RemoveContextMenuButtonsParams createFromParcel(Parcel in) { + return new RemoveContextMenuButtonsParams(in); + } + + public RemoveContextMenuButtonsParams[] newArray(int size) { + return new RemoveContextMenuButtonsParams[size]; + } + }; + + public String getParamsId() { + return paramsId; + } + + public long getCallbackId() { + return callbackId; + } + + public void writeToParcel(Parcel dest, int flags) { + dest.writeString(paramsId); + dest.writeLong(callbackId); + } + + private void readFromParcel(Parcel in) { + paramsId = in.readString(); + callbackId = in.readLong(); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/UpdateContextMenuButtonsParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/UpdateContextMenuButtonsParams.aidl new file mode 100644 index 0000000000..f5482b3452 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/UpdateContextMenuButtonsParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.contextmenu; + +parcelable UpdateContextMenuButtonsParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/UpdateContextMenuButtonsParams.java b/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/UpdateContextMenuButtonsParams.java new file mode 100644 index 0000000000..ce4d4a637c --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/UpdateContextMenuButtonsParams.java @@ -0,0 +1,43 @@ +package net.osmand.aidl.contextmenu; + +import android.os.Parcel; +import android.os.Parcelable; + +public class UpdateContextMenuButtonsParams implements Parcelable { + private ContextMenuButtonsParams buttonsParams; + + public UpdateContextMenuButtonsParams(ContextMenuButtonsParams widget) { + this.buttonsParams = widget; + } + + public UpdateContextMenuButtonsParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + public UpdateContextMenuButtonsParams createFromParcel(Parcel in) { + return new UpdateContextMenuButtonsParams(in); + } + + public UpdateContextMenuButtonsParams[] newArray(int size) { + return new UpdateContextMenuButtonsParams[size]; + } + }; + + public ContextMenuButtonsParams getContextMenuButtonsParams() { + return buttonsParams; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeParcelable(buttonsParams, flags); + } + + private void readFromParcel(Parcel in) { + buttonsParams = in.readParcelable(ContextMenuButtonsParams.class.getClassLoader()); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/copyfile/CopyFileParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/copyfile/CopyFileParams.aidl new file mode 100644 index 0000000000..a786325e98 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/copyfile/CopyFileParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.copyfile; + +parcelable CopyFileParams; diff --git a/OsmAnd-telegram/src/net/osmand/aidl/copyfile/CopyFileParams.java b/OsmAnd-telegram/src/net/osmand/aidl/copyfile/CopyFileParams.java new file mode 100644 index 0000000000..e795d5b7b7 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/copyfile/CopyFileParams.java @@ -0,0 +1,78 @@ +package net.osmand.aidl.copyfile; + +import android.os.Parcel; +import android.os.Parcelable; +import android.support.annotation.NonNull; + +public class CopyFileParams implements Parcelable { + private String fileName; + private byte[] filePartData; + private long startTime; + private boolean done; + + public CopyFileParams(@NonNull String fileName, @NonNull byte[] filePartData, long startTime, boolean done) { + this.fileName = fileName; + this.filePartData = filePartData; + this.startTime = startTime; + this.done = done; + } + + public String getFileName() { + return fileName; + } + + public byte[] getFilePartData() { + return filePartData; + } + + public boolean isDone() { + return done; + } + + public long getStartTime() { + return startTime; + } + + protected CopyFileParams(Parcel in) { + fileName = in.readString(); + filePartData = in.createByteArray(); + startTime = in.readLong(); + done = in.readByte() == 0; + } + + public static final Creator CREATOR = new Creator() { + @Override + public CopyFileParams createFromParcel(Parcel in) { + return new CopyFileParams(in); + } + + @Override + public CopyFileParams[] newArray(int size) { + return new CopyFileParams[size]; + } + }; + + + @Override + public int describeContents() { + return 0; + } + + @Override + public String toString() { + return "CopyFileParams {" + + " fileName=" + fileName + + ", filePartData size=" + filePartData.length + + ", startTime=" + startTime + + ", done=" + done + + " }"; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + dest.writeString(fileName); + dest.writeByteArray(filePartData); + dest.writeLong(startTime); + dest.writeByte((byte) (done ? 0 : 1)); + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/customization/CustomizationInfoParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/customization/CustomizationInfoParams.aidl new file mode 100644 index 0000000000..e72d2d47dc --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/customization/CustomizationInfoParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.customization; + +parcelable CustomizationInfoParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/customization/CustomizationInfoParams.java b/OsmAnd-telegram/src/net/osmand/aidl/customization/CustomizationInfoParams.java new file mode 100644 index 0000000000..0e83f7f41c --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/customization/CustomizationInfoParams.java @@ -0,0 +1,172 @@ +package net.osmand.aidl.customization; + +import android.annotation.SuppressLint; +import android.os.Parcel; +import android.os.Parcelable; + +import net.osmand.aidl.navdrawer.NavDrawerFooterParams; +import net.osmand.aidl.navdrawer.NavDrawerHeaderParams; +import net.osmand.aidl.navdrawer.SetNavDrawerItemsParams; +import net.osmand.aidl.plugins.PluginParams; + +import java.util.ArrayList; +import java.util.List; + +public class CustomizationInfoParams implements Parcelable { + + private OsmandSettingsParams settingsParams; + + private NavDrawerHeaderParams navDrawerHeaderParams; + private NavDrawerFooterParams navDrawerFooterParams; + private SetNavDrawerItemsParams navDrawerItemsParams; + + private ArrayList visibilityWidgetsParams = new ArrayList<>(); + private ArrayList availabilityWidgetsParams = new ArrayList<>(); + + private ArrayList pluginsParams = new ArrayList<>(); + + private List featuresEnabledIds = new ArrayList<>(); + private List featuresDisabledIds = new ArrayList<>(); + private List featuresEnabledPatterns = new ArrayList<>(); + private List featuresDisabledPatterns = new ArrayList<>(); + + public CustomizationInfoParams(OsmandSettingsParams settingsParams, + NavDrawerHeaderParams navDrawerHeaderParams, + NavDrawerFooterParams navDrawerFooterParams, + SetNavDrawerItemsParams navDrawerItemsParams, + ArrayList visibilityWidgetsParams, + ArrayList availabilityWidgetsParams, + ArrayList pluginsParams, + List featuresEnabledIds, + List featuresDisabledIds, + List featuresEnabledPatterns, + List featuresDisabledPatterns) { + this.settingsParams = settingsParams; + this.navDrawerHeaderParams = navDrawerHeaderParams; + this.navDrawerFooterParams = navDrawerFooterParams; + this.navDrawerItemsParams = navDrawerItemsParams; + + if (visibilityWidgetsParams != null) { + this.visibilityWidgetsParams.addAll(visibilityWidgetsParams); + } + if (availabilityWidgetsParams != null) { + this.availabilityWidgetsParams.addAll(availabilityWidgetsParams); + } + if (pluginsParams != null) { + this.pluginsParams.addAll(pluginsParams); + } + if (featuresEnabledIds != null) { + this.featuresEnabledIds.addAll(featuresEnabledIds); + } + if (featuresDisabledIds != null) { + this.featuresDisabledIds.addAll(featuresDisabledIds); + } + if (featuresEnabledPatterns != null) { + this.featuresEnabledPatterns.addAll(featuresEnabledPatterns); + } + if (featuresDisabledPatterns != null) { + this.featuresDisabledPatterns.addAll(featuresDisabledPatterns); + } + } + + public CustomizationInfoParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public CustomizationInfoParams createFromParcel(Parcel in) { + return new CustomizationInfoParams(in); + } + + @Override + public CustomizationInfoParams[] newArray(int size) { + return new CustomizationInfoParams[size]; + } + }; + + public OsmandSettingsParams getSettingsParams() { + return settingsParams; + } + + public NavDrawerHeaderParams getNavDrawerHeaderParams() { + return navDrawerHeaderParams; + } + + public NavDrawerFooterParams getNavDrawerFooterParams() { + return navDrawerFooterParams; + } + + public SetNavDrawerItemsParams getNavDrawerItemsParams() { + return navDrawerItemsParams; + } + + public ArrayList getVisibilityWidgetsParams() { + return visibilityWidgetsParams; + } + + public ArrayList getAvailabilityWidgetsParams() { + return availabilityWidgetsParams; + } + + public ArrayList getPluginsParams() { + return pluginsParams; + } + + public List getFeaturesEnabledIds() { + return featuresEnabledIds; + } + + public List getFeaturesDisabledIds() { + return featuresDisabledIds; + } + + public List getFeaturesEnabledPatterns() { + return featuresEnabledPatterns; + } + + public List getFeaturesDisabledPatterns() { + return featuresDisabledPatterns; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeParcelable(settingsParams, flags); + + out.writeParcelable(navDrawerHeaderParams, flags); + out.writeParcelable(navDrawerFooterParams, flags); + out.writeParcelable(navDrawerItemsParams, flags); + + out.writeTypedList(visibilityWidgetsParams); + out.writeTypedList(availabilityWidgetsParams); + out.writeTypedList(pluginsParams); + + out.writeStringList(featuresEnabledIds); + out.writeStringList(featuresDisabledIds); + out.writeStringList(featuresEnabledPatterns); + out.writeStringList(featuresDisabledPatterns); + } + + @SuppressLint("ParcelClassLoader") + private void readFromParcel(Parcel in) { + settingsParams = in.readParcelable(OsmandSettingsParams.class.getClassLoader()); + + navDrawerHeaderParams = in.readParcelable(NavDrawerHeaderParams.class.getClassLoader()); + navDrawerFooterParams = in.readParcelable(NavDrawerFooterParams.class.getClassLoader()); + navDrawerItemsParams = in.readParcelable(SetNavDrawerItemsParams.class.getClassLoader()); + + in.readTypedList(visibilityWidgetsParams, SetWidgetsParams.CREATOR); + in.readTypedList(availabilityWidgetsParams, SetWidgetsParams.CREATOR); + in.readTypedList(pluginsParams, PluginParams.CREATOR); + + in.readStringList(featuresEnabledIds); + in.readStringList(featuresDisabledIds); + in.readStringList(featuresEnabledPatterns); + in.readStringList(featuresDisabledPatterns); + } + + @Override + public int describeContents() { + return 0; + } +} \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsInfoParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsInfoParams.aidl new file mode 100644 index 0000000000..80d0fa56ed --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsInfoParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.customization; + +parcelable OsmandSettingsInfoParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsInfoParams.java b/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsInfoParams.java new file mode 100644 index 0000000000..ba4285af1d --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsInfoParams.java @@ -0,0 +1,50 @@ +package net.osmand.aidl.customization; + +import android.annotation.SuppressLint; +import android.os.Parcel; +import android.os.Parcelable; +import android.support.annotation.NonNull; + +public class OsmandSettingsInfoParams implements Parcelable { + + private String sharedPreferencesName; + + public OsmandSettingsInfoParams(@NonNull String sharedPreferencesName) { + this.sharedPreferencesName = sharedPreferencesName; + } + + public OsmandSettingsInfoParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public OsmandSettingsInfoParams createFromParcel(Parcel in) { + return new OsmandSettingsInfoParams(in); + } + + @Override + public OsmandSettingsInfoParams[] newArray(int size) { + return new OsmandSettingsInfoParams[size]; + } + }; + + public String getSharedPreferencesName() { + return sharedPreferencesName; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeString(sharedPreferencesName); + } + + @SuppressLint("ParcelClassLoader") + private void readFromParcel(Parcel in) { + sharedPreferencesName = in.readString(); + } + + @Override + public int describeContents() { + return 0; + } +} \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsParams.aidl new file mode 100644 index 0000000000..770070bb46 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.customization; + +parcelable OsmandSettingsParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsParams.java b/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsParams.java new file mode 100644 index 0000000000..bff8c68018 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsParams.java @@ -0,0 +1,60 @@ +package net.osmand.aidl.customization; + +import android.annotation.SuppressLint; +import android.os.Bundle; +import android.os.Parcel; +import android.os.Parcelable; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; + +public class OsmandSettingsParams implements Parcelable { + + private String sharedPreferencesName; + private Bundle bundle; + + public OsmandSettingsParams(@NonNull String sharedPreferencesName, @Nullable Bundle bundle) { + this.sharedPreferencesName = sharedPreferencesName; + this.bundle = bundle; + } + + public OsmandSettingsParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public OsmandSettingsParams createFromParcel(Parcel in) { + return new OsmandSettingsParams(in); + } + + @Override + public OsmandSettingsParams[] newArray(int size) { + return new OsmandSettingsParams[size]; + } + }; + + public String getSharedPreferencesName() { + return sharedPreferencesName; + } + + public Bundle getBundle() { + return bundle; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeString(sharedPreferencesName); + out.writeBundle(bundle); + } + + @SuppressLint("ParcelClassLoader") + private void readFromParcel(Parcel in) { + sharedPreferencesName = in.readString(); + bundle = in.readBundle(); + } + + @Override + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/customization/SetWidgetsParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/customization/SetWidgetsParams.aidl new file mode 100644 index 0000000000..235a4abe51 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/customization/SetWidgetsParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.customization; + +parcelable SetWidgetsParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/customization/SetWidgetsParams.java b/OsmAnd-telegram/src/net/osmand/aidl/customization/SetWidgetsParams.java new file mode 100644 index 0000000000..d9343b920e --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/customization/SetWidgetsParams.java @@ -0,0 +1,93 @@ +package net.osmand.aidl.customization; + +import android.os.Parcel; +import android.os.Parcelable; +import android.support.annotation.Nullable; + +import java.util.ArrayList; +import java.util.List; + +public class SetWidgetsParams implements Parcelable { + + private String widgetKey; + private List appModesKeys; + + public SetWidgetsParams(String widgetKey, @Nullable List appModesKeys) { + this.widgetKey = widgetKey; + this.appModesKeys = appModesKeys; + } + + public SetWidgetsParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public SetWidgetsParams createFromParcel(Parcel in) { + return new SetWidgetsParams(in); + } + + @Override + public SetWidgetsParams[] newArray(int size) { + return new SetWidgetsParams[size]; + } + }; + + public String getWidgetKey() { + return widgetKey; + } + + public List getAppModesKeys() { + return appModesKeys; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeString(widgetKey); + writeStringList(out, appModesKeys); + } + + private void readFromParcel(Parcel in) { + widgetKey = in.readString(); + appModesKeys = readStringList(in); + } + + @Override + public int describeContents() { + return 0; + } + + private void writeStringList(Parcel out, List val) { + if (val == null) { + out.writeInt(-1); + return; + } + int N = val.size(); + int i = 0; + out.writeInt(N); + while (i < N) { + out.writeString(val.get(i)); + i++; + } + } + + private List readStringList(Parcel in) { + List list = new ArrayList<>(); + int M = list.size(); + int N = in.readInt(); + if (N == -1) { + return null; + } + int i = 0; + for (; i < M && i < N; i++) { + list.set(i, in.readString()); + } + for (; i < N; i++) { + list.add(in.readString()); + } + for (; i < M; i++) { + list.remove(N); + } + return list; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/AFavorite.aidl b/OsmAnd-telegram/src/net/osmand/aidl/favorite/AFavorite.aidl new file mode 100644 index 0000000000..afd535fbe8 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/favorite/AFavorite.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.favorite; + +parcelable AFavorite; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/AFavorite.java b/OsmAnd-telegram/src/net/osmand/aidl/favorite/AFavorite.java new file mode 100644 index 0000000000..b7fc057249 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/favorite/AFavorite.java @@ -0,0 +1,96 @@ +package net.osmand.aidl.favorite; + +import android.os.Parcel; +import android.os.Parcelable; + +public class AFavorite implements Parcelable { + + private double lat; + private double lon; + private String name; + private String description; + private String category; + private String color; + private boolean visible; + + public AFavorite(double lat, double lon, String name, String description, + String category, String color, boolean visible) { + this.lat = lat; + this.lon = lon; + this.name = name; + this.description = description; + this.category = category; + this.color = color; + this.visible = visible; + } + + public AFavorite(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public AFavorite createFromParcel(Parcel in) { + return new AFavorite(in); + } + + @Override + public AFavorite[] newArray(int size) { + return new AFavorite[size]; + } + }; + + public double getLat() { + return lat; + } + + public double getLon() { + return lon; + } + + public String getName() { + return name; + } + + public String getDescription() { + return description; + } + + public String getCategory() { + return category; + } + + public String getColor() { + return color; + } + + public boolean isVisible() { + return visible; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeDouble(lat); + out.writeDouble(lon); + out.writeString(name); + out.writeString(description); + out.writeString(category); + out.writeString(color); + out.writeByte((byte) (visible ? 1 : 0)); + } + + private void readFromParcel(Parcel in) { + lat = in.readDouble(); + lon = in.readDouble(); + name = in.readString(); + description = in.readString(); + category = in.readString(); + color = in.readString(); + visible = in.readByte() != 0; + } + + @Override + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/AddFavoriteParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/favorite/AddFavoriteParams.aidl new file mode 100644 index 0000000000..c546992b10 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/favorite/AddFavoriteParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.favorite; + +parcelable AddFavoriteParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/AddFavoriteParams.java b/OsmAnd-telegram/src/net/osmand/aidl/favorite/AddFavoriteParams.java new file mode 100644 index 0000000000..87baeb5a99 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/favorite/AddFavoriteParams.java @@ -0,0 +1,47 @@ +package net.osmand.aidl.favorite; + +import android.os.Parcel; +import android.os.Parcelable; + +public class AddFavoriteParams implements Parcelable { + + private AFavorite favorite; + + public AddFavoriteParams(AFavorite favorite) { + this.favorite = favorite; + } + + public AddFavoriteParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public AddFavoriteParams createFromParcel(Parcel in) { + return new AddFavoriteParams(in); + } + + @Override + public AddFavoriteParams[] newArray(int size) { + return new AddFavoriteParams[size]; + } + }; + + public AFavorite getFavorite() { + return favorite; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeParcelable(favorite, flags); + } + + private void readFromParcel(Parcel in) { + favorite = in.readParcelable(AFavorite.class.getClassLoader()); + } + + @Override + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/RemoveFavoriteParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/favorite/RemoveFavoriteParams.aidl new file mode 100644 index 0000000000..37c08cd374 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/favorite/RemoveFavoriteParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.favorite; + +parcelable RemoveFavoriteParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/RemoveFavoriteParams.java b/OsmAnd-telegram/src/net/osmand/aidl/favorite/RemoveFavoriteParams.java new file mode 100644 index 0000000000..15e2ca74bd --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/favorite/RemoveFavoriteParams.java @@ -0,0 +1,47 @@ +package net.osmand.aidl.favorite; + +import android.os.Parcel; +import android.os.Parcelable; + +public class RemoveFavoriteParams implements Parcelable { + + private AFavorite favorite; + + public RemoveFavoriteParams(AFavorite favorite) { + this.favorite = favorite; + } + + public RemoveFavoriteParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public RemoveFavoriteParams createFromParcel(Parcel in) { + return new RemoveFavoriteParams(in); + } + + @Override + public RemoveFavoriteParams[] newArray(int size) { + return new RemoveFavoriteParams[size]; + } + }; + + public AFavorite getFavorite() { + return favorite; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeParcelable(favorite, flags); + } + + private void readFromParcel(Parcel in) { + favorite = in.readParcelable(AFavorite.class.getClassLoader()); + } + + @Override + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/UpdateFavoriteParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/favorite/UpdateFavoriteParams.aidl new file mode 100644 index 0000000000..ba4a9364d3 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/favorite/UpdateFavoriteParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.favorite; + +parcelable UpdateFavoriteParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/UpdateFavoriteParams.java b/OsmAnd-telegram/src/net/osmand/aidl/favorite/UpdateFavoriteParams.java new file mode 100644 index 0000000000..43fdfc13bd --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/favorite/UpdateFavoriteParams.java @@ -0,0 +1,55 @@ +package net.osmand.aidl.favorite; + +import android.os.Parcel; +import android.os.Parcelable; + +public class UpdateFavoriteParams implements Parcelable { + + private AFavorite favoritePrev; + private AFavorite favoriteNew; + + public UpdateFavoriteParams(AFavorite favoritePrev, AFavorite favoriteNew) { + this.favoritePrev = favoritePrev; + this.favoriteNew = favoriteNew; + } + + public UpdateFavoriteParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public UpdateFavoriteParams createFromParcel(Parcel in) { + return new UpdateFavoriteParams(in); + } + + @Override + public UpdateFavoriteParams[] newArray(int size) { + return new UpdateFavoriteParams[size]; + } + }; + + public AFavorite getFavoritePrev() { + return favoritePrev; + } + + public AFavorite getFavoriteNew() { + return favoriteNew; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeParcelable(favoritePrev, flags); + out.writeParcelable(favoriteNew, flags); + } + + private void readFromParcel(Parcel in) { + favoritePrev = in.readParcelable(AFavorite.class.getClassLoader()); + favoriteNew = in.readParcelable(AFavorite.class.getClassLoader()); + } + + @Override + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AFavoriteGroup.aidl b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AFavoriteGroup.aidl new file mode 100644 index 0000000000..baec925474 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AFavoriteGroup.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.favorite.group; + +parcelable AFavoriteGroup; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AFavoriteGroup.java b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AFavoriteGroup.java new file mode 100644 index 0000000000..e9b6348468 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AFavoriteGroup.java @@ -0,0 +1,63 @@ +package net.osmand.aidl.favorite.group; + +import android.os.Parcel; +import android.os.Parcelable; + +public class AFavoriteGroup implements Parcelable { + + private String name; + private String color; + private boolean visible; + + public AFavoriteGroup(String name, String color, boolean visible) { + this.name = name; + this.color = color; + this.visible = visible; + } + + public AFavoriteGroup(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public AFavoriteGroup createFromParcel(Parcel in) { + return new AFavoriteGroup(in); + } + + @Override + public AFavoriteGroup[] newArray(int size) { + return new AFavoriteGroup[size]; + } + }; + + public String getName() { + return name; + } + + public String getColor() { + return color; + } + + public boolean isVisible() { + return visible; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeString(name); + out.writeString(color); + out.writeByte((byte) (visible ? 1 : 0)); + } + + private void readFromParcel(Parcel in) { + name = in.readString(); + color = in.readString(); + visible = in.readByte() != 0; + } + + @Override + public int describeContents() { + return 0; + } +} \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AddFavoriteGroupParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AddFavoriteGroupParams.aidl new file mode 100644 index 0000000000..5850b5cd34 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AddFavoriteGroupParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.favorite.group; + +parcelable AddFavoriteGroupParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AddFavoriteGroupParams.java b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AddFavoriteGroupParams.java new file mode 100644 index 0000000000..7cb3228572 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AddFavoriteGroupParams.java @@ -0,0 +1,47 @@ +package net.osmand.aidl.favorite.group; + +import android.os.Parcel; +import android.os.Parcelable; + +public class AddFavoriteGroupParams implements Parcelable { + + private AFavoriteGroup favoriteGroup; + + public AddFavoriteGroupParams(AFavoriteGroup favoriteGroup) { + this.favoriteGroup = favoriteGroup; + } + + public AddFavoriteGroupParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public AddFavoriteGroupParams createFromParcel(Parcel in) { + return new AddFavoriteGroupParams(in); + } + + @Override + public AddFavoriteGroupParams[] newArray(int size) { + return new AddFavoriteGroupParams[size]; + } + }; + + public AFavoriteGroup getFavoriteGroup() { + return favoriteGroup; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeParcelable(favoriteGroup, flags); + } + + private void readFromParcel(Parcel in) { + favoriteGroup = in.readParcelable(AFavoriteGroup.class.getClassLoader()); + } + + @Override + public int describeContents() { + return 0; + } +} \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/RemoveFavoriteGroupParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/RemoveFavoriteGroupParams.aidl new file mode 100644 index 0000000000..e8b0710a01 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/RemoveFavoriteGroupParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.favorite.group; + +parcelable RemoveFavoriteGroupParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/RemoveFavoriteGroupParams.java b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/RemoveFavoriteGroupParams.java new file mode 100644 index 0000000000..0b17274440 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/RemoveFavoriteGroupParams.java @@ -0,0 +1,47 @@ +package net.osmand.aidl.favorite.group; + +import android.os.Parcel; +import android.os.Parcelable; + +public class RemoveFavoriteGroupParams implements Parcelable { + + private AFavoriteGroup favoriteGroup; + + public RemoveFavoriteGroupParams(AFavoriteGroup favoriteGroup) { + this.favoriteGroup = favoriteGroup; + } + + public RemoveFavoriteGroupParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public RemoveFavoriteGroupParams createFromParcel(Parcel in) { + return new RemoveFavoriteGroupParams(in); + } + + @Override + public RemoveFavoriteGroupParams[] newArray(int size) { + return new RemoveFavoriteGroupParams[size]; + } + }; + + public AFavoriteGroup getFavoriteGroup() { + return favoriteGroup; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeParcelable(favoriteGroup, flags); + } + + private void readFromParcel(Parcel in) { + favoriteGroup = in.readParcelable(AFavoriteGroup.class.getClassLoader()); + } + + @Override + public int describeContents() { + return 0; + } +} \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/UpdateFavoriteGroupParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/UpdateFavoriteGroupParams.aidl new file mode 100644 index 0000000000..e9001a8c5e --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/UpdateFavoriteGroupParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.favorite.group; + +parcelable UpdateFavoriteGroupParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/UpdateFavoriteGroupParams.java b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/UpdateFavoriteGroupParams.java new file mode 100644 index 0000000000..0ea52e1fda --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/UpdateFavoriteGroupParams.java @@ -0,0 +1,55 @@ +package net.osmand.aidl.favorite.group; + +import android.os.Parcel; +import android.os.Parcelable; + +public class UpdateFavoriteGroupParams implements Parcelable { + + private AFavoriteGroup favoriteGroupPrev; + private AFavoriteGroup favoriteGroupNew; + + public UpdateFavoriteGroupParams(AFavoriteGroup favoriteGroup, AFavoriteGroup favoriteGroupNew) { + this.favoriteGroupPrev = favoriteGroup; + this.favoriteGroupNew = favoriteGroupNew; + } + + public UpdateFavoriteGroupParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public UpdateFavoriteGroupParams createFromParcel(Parcel in) { + return new UpdateFavoriteGroupParams(in); + } + + @Override + public UpdateFavoriteGroupParams[] newArray(int size) { + return new UpdateFavoriteGroupParams[size]; + } + }; + + public AFavoriteGroup getFavoriteGroupPrev() { + return favoriteGroupPrev; + } + + public AFavoriteGroup getFavoriteGroupNew() { + return favoriteGroupNew; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeParcelable(favoriteGroupPrev, flags); + out.writeParcelable(favoriteGroupNew, flags); + } + + private void readFromParcel(Parcel in) { + favoriteGroupPrev = in.readParcelable(AFavoriteGroup.class.getClassLoader()); + favoriteGroupNew = in.readParcelable(AFavoriteGroup.class.getClassLoader()); + } + + @Override + public int describeContents() { + return 0; + } +} \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxBitmap.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxBitmap.aidl new file mode 100644 index 0000000000..128f5e6b94 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxBitmap.aidl @@ -0,0 +1,4 @@ +package net.osmand.aidl.gpx; + +parcelable AGpxBitmap; + diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxBitmap.java b/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxBitmap.java new file mode 100644 index 0000000000..f4bdef433d --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxBitmap.java @@ -0,0 +1,46 @@ +package net.osmand.aidl.gpx; + +import android.graphics.Bitmap; +import android.os.Parcel; +import android.os.Parcelable; +import android.support.annotation.NonNull; + +public class AGpxBitmap implements Parcelable { + + private Bitmap bitmap; + + public AGpxBitmap(@NonNull Bitmap bitmap) { + this.bitmap = bitmap; + } + + public AGpxBitmap(Parcel in) { + readFromParcel(in); + } + + public Bitmap getBitmap() { + return bitmap; + } + + public static final Creator CREATOR = new + Creator() { + public AGpxBitmap createFromParcel(Parcel in) { + return new AGpxBitmap(in); + } + + public AGpxBitmap[] newArray(int size) { + return new AGpxBitmap[size]; + } + }; + + public void writeToParcel(Parcel out, int flags) { + out.writeParcelable(bitmap, flags); + } + + private void readFromParcel(Parcel in) { + bitmap = in.readParcelable(Bitmap.class.getClassLoader()); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFile.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFile.aidl new file mode 100644 index 0000000000..413d34a571 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFile.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.gpx; + +parcelable AGpxFile; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFile.java b/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFile.java new file mode 100644 index 0000000000..028c0a628a --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFile.java @@ -0,0 +1,88 @@ +package net.osmand.aidl.gpx; + +import android.os.Parcel; +import android.os.Parcelable; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; + +public class AGpxFile implements Parcelable { + + private String fileName; + private long modifiedTime; + private long fileSize; + private boolean active; + private AGpxFileDetails details; + + public AGpxFile(@NonNull String fileName, long modifiedTime, long fileSize, boolean active, @Nullable AGpxFileDetails details) { + this.fileName = fileName; + this.modifiedTime = modifiedTime; + this.fileSize = fileSize; + this.active = active; + this.details = details; + } + + public AGpxFile(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + public AGpxFile createFromParcel(Parcel in) { + return new AGpxFile(in); + } + + public AGpxFile[] newArray(int size) { + return new AGpxFile[size]; + } + }; + + public String getFileName() { + return fileName; + } + + public long getModifiedTime() { + return modifiedTime; + } + + public long getFileSize() { + return fileSize; + } + + public boolean isActive() { + return active; + } + + public AGpxFileDetails getDetails() { + return details; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeString(fileName); + out.writeLong(modifiedTime); + out.writeLong(fileSize); + out.writeByte((byte) (active ? 1 : 0)); + + out.writeByte((byte) (details != null ? 1 : 0)); + if (details != null) { + out.writeParcelable(details, flags); + } + } + + private void readFromParcel(Parcel in) { + fileName = in.readString(); + modifiedTime = in.readLong(); + fileSize = in.readLong(); + active = in.readByte() != 0; + + boolean hasDetails = in.readByte() != 0; + if (hasDetails) { + details = in.readParcelable(AGpxFileDetails.class.getClassLoader()); + } else { + details = null; + } + } + + public int describeContents() { + return 0; + } +} \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFileDetails.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFileDetails.aidl new file mode 100644 index 0000000000..1e2cdec2b1 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFileDetails.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.gpx; + +parcelable AGpxFileDetails; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFileDetails.java b/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFileDetails.java new file mode 100644 index 0000000000..3fe755135e --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFileDetails.java @@ -0,0 +1,196 @@ +package net.osmand.aidl.gpx; + +import android.os.Parcel; +import android.os.Parcelable; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +public class AGpxFileDetails implements Parcelable { + + private float totalDistance = 0; + private int totalTracks = 0; + private long startTime = Long.MAX_VALUE; + private long endTime = Long.MIN_VALUE; + private long timeSpan = 0; + private long timeMoving = 0; + private float totalDistanceMoving = 0; + + private double diffElevationUp = 0; + private double diffElevationDown = 0; + private double avgElevation = 0; + private double minElevation = 99999; + private double maxElevation = -100; + + private float minSpeed = Float.MAX_VALUE; + private float maxSpeed = 0; + private float avgSpeed; + + private int points; + private int wptPoints = 0; + + private List wptCategoryNames = new ArrayList<>(); + + public AGpxFileDetails(float totalDistance, int totalTracks, + long startTime, long endTime, + long timeSpan, long timeMoving, float totalDistanceMoving, + double diffElevationUp, double diffElevationDown, + double avgElevation, double minElevation, double maxElevation, + float minSpeed, float maxSpeed, float avgSpeed, + int points, int wptPoints, Set wptCategoryNames) { + this.totalDistance = totalDistance; + this.totalTracks = totalTracks; + this.startTime = startTime; + this.endTime = endTime; + this.timeSpan = timeSpan; + this.timeMoving = timeMoving; + this.totalDistanceMoving = totalDistanceMoving; + this.diffElevationUp = diffElevationUp; + this.diffElevationDown = diffElevationDown; + this.avgElevation = avgElevation; + this.minElevation = minElevation; + this.maxElevation = maxElevation; + this.minSpeed = minSpeed; + this.maxSpeed = maxSpeed; + this.avgSpeed = avgSpeed; + this.points = points; + this.wptPoints = wptPoints; + if (wptCategoryNames != null) { + this.wptCategoryNames = new ArrayList<>(wptCategoryNames); + } + } + + public AGpxFileDetails(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + public AGpxFileDetails createFromParcel(Parcel in) { + return new AGpxFileDetails(in); + } + + public AGpxFileDetails[] newArray(int size) { + return new AGpxFileDetails[size]; + } + }; + + public float getTotalDistance() { + return totalDistance; + } + + public int getTotalTracks() { + return totalTracks; + } + + public long getStartTime() { + return startTime; + } + + public long getEndTime() { + return endTime; + } + + public long getTimeSpan() { + return timeSpan; + } + + public long getTimeMoving() { + return timeMoving; + } + + public float getTotalDistanceMoving() { + return totalDistanceMoving; + } + + public double getDiffElevationUp() { + return diffElevationUp; + } + + public double getDiffElevationDown() { + return diffElevationDown; + } + + public double getAvgElevation() { + return avgElevation; + } + + public double getMinElevation() { + return minElevation; + } + + public double getMaxElevation() { + return maxElevation; + } + + public float getMinSpeed() { + return minSpeed; + } + + public float getMaxSpeed() { + return maxSpeed; + } + + public float getAvgSpeed() { + return avgSpeed; + } + + public int getPoints() { + return points; + } + + public int getWptPoints() { + return wptPoints; + } + + public List getWptCategoryNames() { + return wptCategoryNames; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeFloat(totalDistance); + out.writeInt(totalTracks); + out.writeLong(startTime); + out.writeLong(endTime); + out.writeLong(timeSpan); + out.writeLong(timeMoving); + out.writeFloat(totalDistanceMoving); + out.writeDouble(diffElevationUp); + out.writeDouble(diffElevationDown); + out.writeDouble(avgElevation); + out.writeDouble(minElevation); + out.writeDouble(maxElevation); + out.writeFloat(minSpeed); + out.writeFloat(maxSpeed); + out.writeFloat(avgSpeed); + out.writeInt(points); + out.writeInt(wptPoints); + out.writeStringList(wptCategoryNames); + } + + private void readFromParcel(Parcel in) { + totalDistance = in.readFloat(); + totalTracks = in.readInt(); + startTime = in.readLong(); + endTime = in.readLong(); + timeSpan = in.readLong(); + timeMoving = in.readLong(); + totalDistanceMoving = in.readFloat(); + diffElevationUp = in.readDouble(); + diffElevationDown = in.readDouble(); + avgElevation = in.readDouble(); + minElevation = in.readDouble(); + maxElevation = in.readDouble(); + minSpeed = in.readFloat(); + maxSpeed = in.readFloat(); + avgSpeed = in.readFloat(); + points = in.readInt(); + wptPoints = in.readInt(); + in.readStringList(wptCategoryNames); + } + + public int describeContents() { + return 0; + } +} \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/ASelectedGpxFile.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/ASelectedGpxFile.aidl new file mode 100644 index 0000000000..23fc3312b4 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/ASelectedGpxFile.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.gpx; + +parcelable ASelectedGpxFile; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/ASelectedGpxFile.java b/OsmAnd-telegram/src/net/osmand/aidl/gpx/ASelectedGpxFile.java new file mode 100644 index 0000000000..6ffc6e2a70 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/ASelectedGpxFile.java @@ -0,0 +1,85 @@ +package net.osmand.aidl.gpx; + +import android.os.Parcel; +import android.os.Parcelable; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; + +public class ASelectedGpxFile implements Parcelable { + + private String fileName; + private long modifiedTime; + private long fileSize; + private AGpxFileDetails details; + + public ASelectedGpxFile(@NonNull String fileName) { + this.fileName = fileName; + } + + public ASelectedGpxFile(@NonNull String fileName, long modifiedTime, long fileSize, @Nullable AGpxFileDetails details) { + this.fileName = fileName; + this.modifiedTime = modifiedTime; + this.fileSize = fileSize; + this.details = details; + } + + public ASelectedGpxFile(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + public ASelectedGpxFile createFromParcel(Parcel in) { + return new ASelectedGpxFile(in); + } + + public ASelectedGpxFile[] newArray(int size) { + return new ASelectedGpxFile[size]; + } + }; + + public String getFileName() { + return fileName; + } + + public long getModifiedTime() { + return modifiedTime; + } + + public long getFileSize() { + return fileSize; + } + + public AGpxFileDetails getDetails() { + return details; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeString(fileName); + out.writeLong(modifiedTime); + out.writeLong(fileSize); + + out.writeByte((byte) (details != null ? 1 : 0)); + if (details != null) { + out.writeParcelable(details, flags); + } + } + + private void readFromParcel(Parcel in) { + fileName = in.readString(); + modifiedTime = in.readLong(); + fileSize = in.readLong(); + + boolean hasDetails= in.readByte() != 0; + if (hasDetails) { + details = in.readParcelable(AGpxFileDetails.class.getClassLoader()); + } else { + details = null; + } + } + + public int describeContents() { + return 0; + } +} + diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/CreateGpxBitmapParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/CreateGpxBitmapParams.aidl new file mode 100644 index 0000000000..b02d5c6e70 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/CreateGpxBitmapParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.gpx; + +parcelable CreateGpxBitmapParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/CreateGpxBitmapParams.java b/OsmAnd-telegram/src/net/osmand/aidl/gpx/CreateGpxBitmapParams.java new file mode 100644 index 0000000000..b6af1d354c --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/CreateGpxBitmapParams.java @@ -0,0 +1,101 @@ +package net.osmand.aidl.gpx; + +import android.net.Uri; +import android.os.Parcel; +import android.os.Parcelable; + +import java.io.File; + +public class CreateGpxBitmapParams implements Parcelable { + + private File gpxFile; + private Uri gpxUri; + private float density; + private int widthPixels; + private int heightPixels; + private int color; //ARGB color int + + public CreateGpxBitmapParams(File gpxFile, float density, int widthPixels, int heightPixels, int color) { + this.gpxFile = gpxFile; + this.density = density; + this.widthPixels = widthPixels; + this.heightPixels = heightPixels; + this.color = color; + } + + public CreateGpxBitmapParams(Uri gpxUri, float density, int widthPixels, int heightPixels, int color) { + this.gpxUri = gpxUri; + this.density = density; + this.widthPixels = widthPixels; + this.heightPixels = heightPixels; + this.color = color; + } + + public CreateGpxBitmapParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + public CreateGpxBitmapParams createFromParcel(Parcel in) { + return new CreateGpxBitmapParams(in); + } + + public CreateGpxBitmapParams[] newArray(int size) { + return new CreateGpxBitmapParams[size]; + } + }; + + public File getGpxFile() { + return gpxFile; + } + + public Uri getGpxUri() { + return gpxUri; + } + + public int getWidthPixels() { + return widthPixels; + } + + public int getHeightPixels() { + return heightPixels; + } + + public float getDensity() { + return density; + } + + public int getColor() { + return color; + } + + public void writeToParcel(Parcel out, int flags) { + if (gpxFile != null) { + out.writeString(gpxFile.getAbsolutePath()); + } else { + out.writeString(null); + } + out.writeParcelable(gpxUri, flags); + out.writeFloat(density); + out.writeInt(widthPixels); + out.writeInt(heightPixels); + out.writeInt(color); + } + + private void readFromParcel(Parcel in) { + String gpxAbsolutePath = in.readString(); + if (gpxAbsolutePath != null) { + gpxFile = new File(gpxAbsolutePath); + } + gpxUri = in.readParcelable(Uri.class.getClassLoader()); + density = in.readFloat(); + widthPixels = in.readInt(); + heightPixels = in.readInt(); + color = in.readInt(); + } + + public int describeContents() { + return 0; + } +} \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/GpxColorParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/GpxColorParams.aidl new file mode 100644 index 0000000000..bd26e19344 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/GpxColorParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.gpx; + +parcelable GpxColorParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/GpxColorParams.java b/OsmAnd-telegram/src/net/osmand/aidl/gpx/GpxColorParams.java new file mode 100644 index 0000000000..cd039ec0cc --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/GpxColorParams.java @@ -0,0 +1,66 @@ +package net.osmand.aidl.gpx; + +import android.os.Parcel; +import android.os.Parcelable; +import android.support.annotation.NonNull; + +public class GpxColorParams implements Parcelable { + + private String fileName; + private String gpxColor; + + public GpxColorParams() { + + } + + public GpxColorParams(@NonNull String fileName) { + this.fileName = fileName; + } + + public GpxColorParams(@NonNull String fileName, String gpxColor) { + this.fileName = fileName; + this.gpxColor = gpxColor; + } + + public GpxColorParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + public GpxColorParams createFromParcel(Parcel in) { + return new GpxColorParams(in); + } + + public GpxColorParams[] newArray(int size) { + return new GpxColorParams[size]; + } + }; + + public String getFileName() { + return fileName; + } + + public String getGpxColor() { + return gpxColor; + } + + public void setGpxColor(String gpxColor) { + this.gpxColor = gpxColor; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeString(fileName); + out.writeString(gpxColor); + } + + public void readFromParcel(Parcel in) { + fileName = in.readString(); + gpxColor = in.readString(); + } + + public int describeContents() { + return 0; + } +} + diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/HideGpxParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/HideGpxParams.aidl new file mode 100644 index 0000000000..4c8992552c --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/HideGpxParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.gpx; + +parcelable HideGpxParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/HideGpxParams.java b/OsmAnd-telegram/src/net/osmand/aidl/gpx/HideGpxParams.java new file mode 100644 index 0000000000..5e37c66f80 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/HideGpxParams.java @@ -0,0 +1,45 @@ +package net.osmand.aidl.gpx; + +import android.os.Parcel; +import android.os.Parcelable; + +public class HideGpxParams implements Parcelable { + + private String fileName; + + public HideGpxParams(String fileName) { + this.fileName = fileName; + } + + public HideGpxParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + public HideGpxParams createFromParcel(Parcel in) { + return new HideGpxParams(in); + } + + public HideGpxParams[] newArray(int size) { + return new HideGpxParams[size]; + } + }; + + public String getFileName() { + return fileName; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeString(fileName); + } + + private void readFromParcel(Parcel in) { + fileName = in.readString(); + } + + public int describeContents() { + return 0; + } +} + diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/ImportGpxParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/ImportGpxParams.aidl new file mode 100644 index 0000000000..23ecdb6ff3 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/ImportGpxParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.gpx; + +parcelable ImportGpxParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/ImportGpxParams.java b/OsmAnd-telegram/src/net/osmand/aidl/gpx/ImportGpxParams.java new file mode 100644 index 0000000000..6d2ed2cb88 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/ImportGpxParams.java @@ -0,0 +1,106 @@ +package net.osmand.aidl.gpx; + +import android.net.Uri; +import android.os.Parcel; +import android.os.Parcelable; + +import java.io.File; + +public class ImportGpxParams implements Parcelable { + + private File gpxFile; + private Uri gpxUri; + private String sourceRawData; + private String destinationPath; + private String color; + private boolean show; + + public ImportGpxParams(File gpxFile, String destinationPath, String color, boolean show) { + this.gpxFile = gpxFile; + this.destinationPath = destinationPath; + this.color = color; + this.show = show; + } + + public ImportGpxParams(Uri gpxUri, String destinationPath, String color, boolean show) { + this.gpxUri = gpxUri; + this.destinationPath = destinationPath; + this.color = color; + this.show = show; + } + + public ImportGpxParams(String sourceRawData, String destinationPath, String color, boolean show) { + this.sourceRawData = sourceRawData; + this.destinationPath = destinationPath; + this.color = color; + this.show = show; + } + + public ImportGpxParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + public ImportGpxParams createFromParcel(Parcel in) { + return new ImportGpxParams(in); + } + + public ImportGpxParams[] newArray(int size) { + return new ImportGpxParams[size]; + } + }; + + public File getGpxFile() { + return gpxFile; + } + + public Uri getGpxUri() { + return gpxUri; + } + + public String getSourceRawData() { + return sourceRawData; + } + + public String getDestinationPath() { + return destinationPath; + } + + public String getColor() { + return color; + } + + public boolean isShow() { + return show; + } + + public void writeToParcel(Parcel out, int flags) { + if (gpxFile != null) { + out.writeString(gpxFile.getAbsolutePath()); + } else { + out.writeString(null); + } + out.writeParcelable(gpxUri, flags); + out.writeString(sourceRawData); + out.writeString(destinationPath); + out.writeString(color); + out.writeByte((byte) (show ? 1 : 0)); + } + + private void readFromParcel(Parcel in) { + String gpxAbsolutePath = in.readString(); + if (gpxAbsolutePath != null) { + gpxFile = new File(gpxAbsolutePath); + } + gpxUri = in.readParcelable(Uri.class.getClassLoader()); + sourceRawData = in.readString(); + destinationPath = in.readString(); + color = in.readString(); + show = in.readByte() == 1; + } + + public int describeContents() { + return 0; + } +} \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/RemoveGpxParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/RemoveGpxParams.aidl new file mode 100644 index 0000000000..e9025f7a19 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/RemoveGpxParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.gpx; + +parcelable RemoveGpxParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/RemoveGpxParams.java b/OsmAnd-telegram/src/net/osmand/aidl/gpx/RemoveGpxParams.java new file mode 100644 index 0000000000..2253fa3616 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/RemoveGpxParams.java @@ -0,0 +1,48 @@ +package net.osmand.aidl.gpx; + +import android.os.Parcel; +import android.os.Parcelable; + +public class RemoveGpxParams implements Parcelable { + + private String fileName; + + public RemoveGpxParams(String fileName) { + this.fileName = fileName; + } + + public RemoveGpxParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + @Override + public RemoveGpxParams createFromParcel(Parcel in) { + return new RemoveGpxParams(in); + } + + @Override + public RemoveGpxParams[] newArray(int size) { + return new RemoveGpxParams[size]; + } + }; + + public String getFileName() { + return fileName; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeString(fileName); + } + + private void readFromParcel(Parcel in) { + fileName = in.readString(); + } + + @Override + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/ShowGpxParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/ShowGpxParams.aidl new file mode 100644 index 0000000000..217f600c4e --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/ShowGpxParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.gpx; + +parcelable ShowGpxParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/ShowGpxParams.java b/OsmAnd-telegram/src/net/osmand/aidl/gpx/ShowGpxParams.java new file mode 100644 index 0000000000..4d385a65a4 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/ShowGpxParams.java @@ -0,0 +1,44 @@ +package net.osmand.aidl.gpx; + +import android.os.Parcel; +import android.os.Parcelable; + +public class ShowGpxParams implements Parcelable { + + private String fileName; + + public ShowGpxParams(String fileName) { + this.fileName = fileName; + } + + public ShowGpxParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + public ShowGpxParams createFromParcel(Parcel in) { + return new ShowGpxParams(in); + } + + public ShowGpxParams[] newArray(int size) { + return new ShowGpxParams[size]; + } + }; + + public String getFileName() { + return fileName; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeString(fileName); + } + + private void readFromParcel(Parcel in) { + fileName = in.readString(); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/StartGpxRecordingParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/StartGpxRecordingParams.aidl new file mode 100644 index 0000000000..14f4871540 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/StartGpxRecordingParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.gpx; + +parcelable StartGpxRecordingParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/StartGpxRecordingParams.java b/OsmAnd-telegram/src/net/osmand/aidl/gpx/StartGpxRecordingParams.java new file mode 100644 index 0000000000..139eac8ea3 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/StartGpxRecordingParams.java @@ -0,0 +1,40 @@ +package net.osmand.aidl.gpx; + +import android.os.Parcel; +import android.os.Parcelable; + +public class StartGpxRecordingParams implements Parcelable { + + public StartGpxRecordingParams() { + + } + + public StartGpxRecordingParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public StartGpxRecordingParams createFromParcel(Parcel in) { + return new StartGpxRecordingParams(in); + } + + @Override + public StartGpxRecordingParams[] newArray(int size) { + return new StartGpxRecordingParams[size]; + } + }; + + @Override + public void writeToParcel(Parcel out, int flags) { + } + + private void readFromParcel(Parcel in) { + + } + + @Override + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/StopGpxRecordingParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/StopGpxRecordingParams.aidl new file mode 100644 index 0000000000..db08f1811a --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/StopGpxRecordingParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.gpx; + +parcelable StopGpxRecordingParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/StopGpxRecordingParams.java b/OsmAnd-telegram/src/net/osmand/aidl/gpx/StopGpxRecordingParams.java new file mode 100644 index 0000000000..ada47db418 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/gpx/StopGpxRecordingParams.java @@ -0,0 +1,40 @@ +package net.osmand.aidl.gpx; + +import android.os.Parcel; +import android.os.Parcelable; + +public class StopGpxRecordingParams implements Parcelable { + + public StopGpxRecordingParams() { + + } + + public StopGpxRecordingParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public StopGpxRecordingParams createFromParcel(Parcel in) { + return new StopGpxRecordingParams(in); + } + + @Override + public StopGpxRecordingParams[] newArray(int size) { + return new StopGpxRecordingParams[size]; + } + }; + + @Override + public void writeToParcel(Parcel out, int flags) { + } + + private void readFromParcel(Parcel in) { + + } + + @Override + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/map/ALatLon.aidl b/OsmAnd-telegram/src/net/osmand/aidl/map/ALatLon.aidl new file mode 100644 index 0000000000..33d5930f02 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/map/ALatLon.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.map; + +parcelable ALatLon; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/map/ALatLon.java b/OsmAnd-telegram/src/net/osmand/aidl/map/ALatLon.java new file mode 100644 index 0000000000..377344fd6a --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/map/ALatLon.java @@ -0,0 +1,83 @@ +package net.osmand.aidl.map; + +import android.os.Parcel; +import android.os.Parcelable; + +public class ALatLon implements Parcelable { + + private double longitude; + private double latitude; + + public ALatLon(double latitude, double longitude) { + this.latitude = latitude; + this.longitude = longitude; + } + + public ALatLon(Parcel in) { + readFromParcel(in); + } + + public static final Parcelable.Creator CREATOR = new + Parcelable.Creator() { + public ALatLon createFromParcel(Parcel in) { + return new ALatLon(in); + } + + public ALatLon[] newArray(int size) { + return new ALatLon[size]; + } + }; + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + int temp; + temp = (int)Math.floor(latitude * 10000); + result = prime * result + temp; + temp = (int)Math.floor(longitude * 10000); + result = prime * result + temp; + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + + ALatLon other = (ALatLon) obj; + return Math.abs(latitude - other.latitude) < 0.00001 + && Math.abs(longitude - other.longitude) < 0.00001; + } + + @Override + public String toString() { + return "Lat " + ((float)latitude) + " Lon " + ((float)longitude); + } + + public double getLatitude() { + return latitude; + } + + public double getLongitude() { + return longitude; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeDouble(latitude); + out.writeDouble(longitude); + } + + public void readFromParcel(Parcel in) { + latitude = in.readDouble(); + longitude = in.readDouble(); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/map/SetMapLocationParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/map/SetMapLocationParams.aidl new file mode 100644 index 0000000000..9edde4f616 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/map/SetMapLocationParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.map; + +parcelable SetMapLocationParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/map/SetMapLocationParams.java b/OsmAnd-telegram/src/net/osmand/aidl/map/SetMapLocationParams.java new file mode 100644 index 0000000000..929c817d9d --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/map/SetMapLocationParams.java @@ -0,0 +1,68 @@ +package net.osmand.aidl.map; + +import android.os.Parcel; +import android.os.Parcelable; + +public class SetMapLocationParams implements Parcelable { + + private double latitude; + private double longitude; + private int zoom; + private boolean animated; + + public SetMapLocationParams(double latitude, double longitude, int zoom, boolean animated) { + this.latitude = latitude; + this.longitude = longitude; + this.zoom = zoom; + this.animated = animated; + } + + public SetMapLocationParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + public SetMapLocationParams createFromParcel(Parcel in) { + return new SetMapLocationParams(in); + } + + public SetMapLocationParams[] newArray(int size) { + return new SetMapLocationParams[size]; + } + }; + + public double getLatitude() { + return latitude; + } + + public double getLongitude() { + return longitude; + } + + public int getZoom() { + return zoom; + } + + public boolean isAnimated() { + return animated; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeDouble(latitude); + out.writeDouble(longitude); + out.writeInt(zoom); + out.writeByte((byte) (animated ? 1 : 0)); + } + + private void readFromParcel(Parcel in) { + latitude = in.readDouble(); + longitude = in.readDouble(); + zoom = in.readInt(); + animated = in.readByte() != 0; + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AMapLayer.aidl b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AMapLayer.aidl new file mode 100644 index 0000000000..745f49f1a5 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AMapLayer.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.maplayer; + +parcelable AMapLayer; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AMapLayer.java b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AMapLayer.java new file mode 100644 index 0000000000..f1c982fa3c --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AMapLayer.java @@ -0,0 +1,176 @@ +package net.osmand.aidl.maplayer; + +import android.os.Parcel; +import android.os.Parcelable; + +import net.osmand.aidl.maplayer.point.AMapPoint; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +public class AMapLayer implements Parcelable { + private String id; + private String name; + private float zOrder = 5.5f; + private Map points = new ConcurrentHashMap<>(); + + private boolean imagePoints = false; + private int circlePointMinZoom = 0; + private int circlePointMaxZoom = 6; + private int smallPointMinZoom = 7; + private int smallPointMaxZoom = 13; + private int bigPointMinZoom = 14; + private int bigPointMaxZoom = 22; + + public AMapLayer(String id, String name, float zOrder, List pointList) { + this.id = id; + this.name = name; + this.zOrder = zOrder; + if (pointList != null) { + for (AMapPoint p : pointList) { + this.points.put(p.getId(), p); + } + } + } + + public AMapLayer(Parcel in) { + readFromParcel(in); + } + + public static final Parcelable.Creator CREATOR = new + Parcelable.Creator() { + public AMapLayer createFromParcel(Parcel in) { + return new AMapLayer(in); + } + + public AMapLayer[] newArray(int size) { + return new AMapLayer[size]; + } + }; + + public String getId() { + return id; + } + + public String getName() { + return name; + } + + public float getZOrder() { + return zOrder; + } + + public List getPoints() { + return new ArrayList<>(points.values()); + } + + public AMapPoint getPoint(String pointId) { + return points.get(pointId); + } + + public boolean hasPoint(String pointId) { + return points.containsKey(pointId); + } + + public void putPoint(AMapPoint point) { + points.put(point.getId(), point); + } + + public void removePoint(String pointId) { + points.remove(pointId); + } + + public boolean isImagePoints() { + return imagePoints; + } + + public void setImagePoints(boolean imagePoints) { + this.imagePoints = imagePoints; + } + + public void copyZoomBounds(AMapLayer layer) { + circlePointMinZoom = layer.circlePointMinZoom; + circlePointMaxZoom = layer.circlePointMaxZoom; + smallPointMinZoom = layer.smallPointMinZoom; + smallPointMaxZoom = layer.smallPointMaxZoom; + bigPointMinZoom = layer.bigPointMinZoom; + bigPointMaxZoom = layer.bigPointMaxZoom; + } + + public void setCirclePointZoomBounds(int min, int max) { + circlePointMinZoom = min; + circlePointMaxZoom = max; + } + + public void setSmallPointZoomBounds(int min, int max) { + smallPointMinZoom = min; + smallPointMaxZoom = max; + } + + public void setBigPointZoomBounds(int min, int max) { + bigPointMinZoom = min; + bigPointMaxZoom = max; + } + + public int getCirclePointMinZoom() { + return circlePointMinZoom; + } + + public int getCirclePointMaxZoom() { + return circlePointMaxZoom; + } + + public int getSmallPointMinZoom() { + return smallPointMinZoom; + } + + public int getSmallPointMaxZoom() { + return smallPointMaxZoom; + } + + public int getBigPointMinZoom() { + return bigPointMinZoom; + } + + public int getBigPointMaxZoom() { + return bigPointMaxZoom; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeString(id); + out.writeString(name); + out.writeFloat(zOrder); + out.writeTypedList(new ArrayList<>(points.values())); + out.writeByte((byte) (imagePoints ? 1 : 0)); + out.writeInt(circlePointMinZoom); + out.writeInt(circlePointMaxZoom); + out.writeInt(smallPointMinZoom); + out.writeInt(smallPointMaxZoom); + out.writeInt(bigPointMinZoom); + out.writeInt(bigPointMaxZoom); + } + + private void readFromParcel(Parcel in) { + id = in.readString(); + name = in.readString(); + zOrder = in.readFloat(); + List pointList = new ArrayList<>(); + in.readTypedList(pointList, AMapPoint.CREATOR); + for (AMapPoint p : pointList) { + this.points.put(p.getId(), p); + } + imagePoints = in.readByte() == 1; + circlePointMinZoom = in.readInt(); + circlePointMaxZoom = in.readInt(); + smallPointMinZoom = in.readInt(); + smallPointMaxZoom = in.readInt(); + bigPointMinZoom = in.readInt(); + bigPointMaxZoom = in.readInt(); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AddMapLayerParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AddMapLayerParams.aidl new file mode 100644 index 0000000000..8116760a45 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AddMapLayerParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.maplayer; + +parcelable AddMapLayerParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AddMapLayerParams.java b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AddMapLayerParams.java new file mode 100644 index 0000000000..38e9e53667 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AddMapLayerParams.java @@ -0,0 +1,44 @@ +package net.osmand.aidl.maplayer; + +import android.os.Parcel; +import android.os.Parcelable; +import android.os.Parcelable.Creator; + +public class AddMapLayerParams implements Parcelable { + private AMapLayer layer; + + public AddMapLayerParams(AMapLayer layer) { + this.layer = layer; + } + + public AddMapLayerParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + public AddMapLayerParams createFromParcel(Parcel in) { + return new AddMapLayerParams(in); + } + + public AddMapLayerParams[] newArray(int size) { + return new AddMapLayerParams[size]; + } + }; + + public AMapLayer getLayer() { + return layer; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeParcelable(layer, flags); + } + + private void readFromParcel(Parcel in) { + layer = in.readParcelable(AMapLayer.class.getClassLoader()); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/RemoveMapLayerParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/RemoveMapLayerParams.aidl new file mode 100644 index 0000000000..20a972ee95 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/RemoveMapLayerParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.maplayer; + +parcelable RemoveMapLayerParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/RemoveMapLayerParams.java b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/RemoveMapLayerParams.java new file mode 100644 index 0000000000..3e87627445 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/RemoveMapLayerParams.java @@ -0,0 +1,44 @@ +package net.osmand.aidl.maplayer; + +import android.os.Parcel; +import android.os.Parcelable; +import android.os.Parcelable.Creator; + +public class RemoveMapLayerParams implements Parcelable { + private String id; + + public RemoveMapLayerParams(String id) { + this.id = id; + } + + public RemoveMapLayerParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + public RemoveMapLayerParams createFromParcel(Parcel in) { + return new RemoveMapLayerParams(in); + } + + public RemoveMapLayerParams[] newArray(int size) { + return new RemoveMapLayerParams[size]; + } + }; + + public String getId() { + return id; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeString(id); + } + + private void readFromParcel(Parcel in) { + id = in.readString(); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/UpdateMapLayerParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/UpdateMapLayerParams.aidl new file mode 100644 index 0000000000..eafe8ef464 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/UpdateMapLayerParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.maplayer; + +parcelable UpdateMapLayerParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/UpdateMapLayerParams.java b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/UpdateMapLayerParams.java new file mode 100644 index 0000000000..a2f6e16498 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/UpdateMapLayerParams.java @@ -0,0 +1,44 @@ +package net.osmand.aidl.maplayer; + +import android.os.Parcel; +import android.os.Parcelable; +import android.os.Parcelable.Creator; + +public class UpdateMapLayerParams implements Parcelable { + private AMapLayer layer; + + public UpdateMapLayerParams(AMapLayer layer) { + this.layer = layer; + } + + public UpdateMapLayerParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + public UpdateMapLayerParams createFromParcel(Parcel in) { + return new UpdateMapLayerParams(in); + } + + public UpdateMapLayerParams[] newArray(int size) { + return new UpdateMapLayerParams[size]; + } + }; + + public AMapLayer getLayer() { + return layer; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeParcelable(layer, flags); + } + + private void readFromParcel(Parcel in) { + layer = in.readParcelable(AMapLayer.class.getClassLoader()); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AMapPoint.aidl b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AMapPoint.aidl new file mode 100644 index 0000000000..53fb86b788 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AMapPoint.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.maplayer.point; + +parcelable AMapPoint; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AMapPoint.java b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AMapPoint.java new file mode 100644 index 0000000000..a47e8ccfe9 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AMapPoint.java @@ -0,0 +1,125 @@ +package net.osmand.aidl.maplayer.point; + +import android.os.Parcel; +import android.os.Parcelable; + +import net.osmand.aidl.map.ALatLon; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class AMapPoint implements Parcelable { + public static final String POINT_IMAGE_URI_PARAM = "point_image_uri_param"; + public static final String POINT_SPEED_PARAM = "point_speed_param"; + public static final String POINT_TYPE_ICON_NAME_PARAM = "point_type_icon_name_param"; + public static final String POINT_STALE_LOC_PARAM = "point_stale_loc_param"; + public static final String POINT_BEARING_PARAM = "point_bearing_param"; + + private String id; + private String shortName; + private String fullName; + private String typeName; + private String layerId; + private int color; + private ALatLon location; + private List details = new ArrayList<>(); + private Map params = new HashMap<>(); + + public AMapPoint(String id, String shortName, String fullName, String typeName, String layerId, + int color, ALatLon location, List details, Map params) { + this.id = id; + this.shortName = shortName; + this.fullName = fullName; + this.typeName = typeName; + this.layerId = layerId; + this.color = color; + this.location = location; + if (details != null) { + this.details.addAll(details); + } + if (params != null) { + this.params.putAll(params); + } + } + + public AMapPoint(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + public AMapPoint createFromParcel(Parcel in) { + return new AMapPoint(in); + } + + public AMapPoint[] newArray(int size) { + return new AMapPoint[size]; + } + }; + + public String getId() { + return id; + } + + public String getShortName() { + return shortName; + } + + public String getFullName() { + return fullName; + } + + public String getTypeName() { + return typeName; + } + + public String getLayerId() { + return layerId; + } + + public int getColor() { + return color; + } + + public ALatLon getLocation() { + return location; + } + + public List getDetails() { + return details; + } + + public Map getParams() { + return params; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeString(id); + out.writeString(shortName); + out.writeString(fullName); + out.writeString(typeName); + out.writeInt(color); + out.writeParcelable(location, flags); + out.writeStringList(details); + out.writeMap(params); + out.writeString(layerId); + } + + private void readFromParcel(Parcel in) { + id = in.readString(); + shortName = in.readString(); + fullName = in.readString(); + typeName = in.readString(); + color = in.readInt(); + location = in.readParcelable(ALatLon.class.getClassLoader()); + in.readStringList(details); + in.readMap(params, HashMap.class.getClassLoader()); + layerId = in.readString(); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AddMapPointParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AddMapPointParams.aidl new file mode 100644 index 0000000000..d41d6b69ca --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AddMapPointParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.maplayer.point; + +parcelable AddMapPointParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AddMapPointParams.java b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AddMapPointParams.java new file mode 100644 index 0000000000..0d575a38d9 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AddMapPointParams.java @@ -0,0 +1,51 @@ +package net.osmand.aidl.maplayer.point; + +import android.os.Parcel; +import android.os.Parcelable; + +public class AddMapPointParams implements Parcelable { + private String layerId; + private AMapPoint point; + + public AddMapPointParams(String layerId, AMapPoint point) { + this.layerId = layerId; + this.point = point; + } + + public AddMapPointParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + public AddMapPointParams createFromParcel(Parcel in) { + return new AddMapPointParams(in); + } + + public AddMapPointParams[] newArray(int size) { + return new AddMapPointParams[size]; + } + }; + + public String getLayerId() { + return layerId; + } + + public AMapPoint getPoint() { + return point; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeString(layerId); + out.writeParcelable(point, flags); + } + + private void readFromParcel(Parcel in) { + layerId = in.readString(); + point = in.readParcelable(AMapPoint.class.getClassLoader()); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/RemoveMapPointParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/RemoveMapPointParams.aidl new file mode 100644 index 0000000000..68a5fdcf11 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/RemoveMapPointParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.maplayer.point; + +parcelable RemoveMapPointParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/RemoveMapPointParams.java b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/RemoveMapPointParams.java new file mode 100644 index 0000000000..797556b1e3 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/RemoveMapPointParams.java @@ -0,0 +1,51 @@ +package net.osmand.aidl.maplayer.point; + +import android.os.Parcel; +import android.os.Parcelable; + +public class RemoveMapPointParams implements Parcelable { + private String layerId; + private String pointId; + + public RemoveMapPointParams(String layerId, String pointId) { + this.layerId = layerId; + this.pointId = pointId; + } + + public RemoveMapPointParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + public RemoveMapPointParams createFromParcel(Parcel in) { + return new RemoveMapPointParams(in); + } + + public RemoveMapPointParams[] newArray(int size) { + return new RemoveMapPointParams[size]; + } + }; + + public String getLayerId() { + return layerId; + } + + public String getPointId() { + return pointId; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeString(layerId); + out.writeString(pointId); + } + + private void readFromParcel(Parcel in) { + layerId = in.readString(); + pointId = in.readString(); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/ShowMapPointParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/ShowMapPointParams.aidl new file mode 100644 index 0000000000..54ff9b2075 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/ShowMapPointParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.maplayer.point; + +parcelable ShowMapPointParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/ShowMapPointParams.java b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/ShowMapPointParams.java new file mode 100644 index 0000000000..5b6e0c17c9 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/ShowMapPointParams.java @@ -0,0 +1,56 @@ +package net.osmand.aidl.maplayer.point; + +import android.os.Parcel; +import android.os.Parcelable; + +public class ShowMapPointParams implements Parcelable { + + private String layerId; + private AMapPoint point; + + public ShowMapPointParams(String layerId, AMapPoint point) { + this.layerId = layerId; + this.point = point; + } + + public ShowMapPointParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + @Override + public ShowMapPointParams createFromParcel(Parcel in) { + return new ShowMapPointParams(in); + } + + @Override + public ShowMapPointParams[] newArray(int size) { + return new ShowMapPointParams[size]; + } + }; + + public String getLayerId() { + return layerId; + } + + public AMapPoint getPoint() { + return point; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeString(layerId); + out.writeParcelable(point, flags); + } + + private void readFromParcel(Parcel in) { + layerId = in.readString(); + point = in.readParcelable(AMapPoint.class.getClassLoader()); + } + + @Override + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/UpdateMapPointParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/UpdateMapPointParams.aidl new file mode 100644 index 0000000000..d81ea87253 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/UpdateMapPointParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.maplayer.point; + +parcelable UpdateMapPointParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/UpdateMapPointParams.java b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/UpdateMapPointParams.java new file mode 100644 index 0000000000..a7b871a1d4 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/UpdateMapPointParams.java @@ -0,0 +1,59 @@ +package net.osmand.aidl.maplayer.point; + +import android.os.Parcel; +import android.os.Parcelable; + +public class UpdateMapPointParams implements Parcelable { + private String layerId; + private AMapPoint point; + private boolean updateOpenedMenuAndMap; + + public UpdateMapPointParams(String layerId, AMapPoint point, boolean updateOpenedMenuAndMap) { + this.layerId = layerId; + this.point = point; + this.updateOpenedMenuAndMap = updateOpenedMenuAndMap; + } + + public UpdateMapPointParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + public UpdateMapPointParams createFromParcel(Parcel in) { + return new UpdateMapPointParams(in); + } + + public UpdateMapPointParams[] newArray(int size) { + return new UpdateMapPointParams[size]; + } + }; + + public String getLayerId() { + return layerId; + } + + public AMapPoint getPoint() { + return point; + } + + public boolean isUpdateOpenedMenuAndMap() { + return updateOpenedMenuAndMap; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeString(layerId); + out.writeParcelable(point, flags); + out.writeInt(updateOpenedMenuAndMap ? 1 : 0); + } + + private void readFromParcel(Parcel in) { + layerId = in.readString(); + point = in.readParcelable(AMapPoint.class.getClassLoader()); + updateOpenedMenuAndMap = in.readInt() != 0; + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AMapMarker.aidl b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AMapMarker.aidl new file mode 100644 index 0000000000..4721b1812b --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AMapMarker.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.mapmarker; + +parcelable AMapMarker; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AMapMarker.java b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AMapMarker.java new file mode 100644 index 0000000000..083b5bbb37 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AMapMarker.java @@ -0,0 +1,63 @@ +package net.osmand.aidl.mapmarker; + +import android.os.Parcel; +import android.os.Parcelable; + +import net.osmand.aidl.map.ALatLon; + +public class AMapMarker implements Parcelable { + + private ALatLon latLon; + private String name; + + public AMapMarker(ALatLon latLon, String name) { + + if (latLon == null) { + throw new IllegalArgumentException("latLon cannot be null"); + } + + if (name == null) { + name = ""; + } + + this.latLon = latLon; + this.name = name; + } + + public AMapMarker(Parcel in) { + readFromParcel(in); + } + + public static final Parcelable.Creator CREATOR = new + Parcelable.Creator() { + public AMapMarker createFromParcel(Parcel in) { + return new AMapMarker(in); + } + + public AMapMarker[] newArray(int size) { + return new AMapMarker[size]; + } + }; + + public ALatLon getLatLon() { + return latLon; + } + + public String getName() { + return name; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeParcelable(latLon, flags); + out.writeString(name); + } + + private void readFromParcel(Parcel in) { + latLon = in.readParcelable(ALatLon.class.getClassLoader()); + name = in.readString(); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AddMapMarkerParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AddMapMarkerParams.aidl new file mode 100644 index 0000000000..eef370b4e2 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AddMapMarkerParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.mapmarker; + +parcelable AddMapMarkerParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AddMapMarkerParams.java b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AddMapMarkerParams.java new file mode 100644 index 0000000000..cc707006e4 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AddMapMarkerParams.java @@ -0,0 +1,44 @@ +package net.osmand.aidl.mapmarker; + +import android.os.Parcel; +import android.os.Parcelable; + +public class AddMapMarkerParams implements Parcelable { + + private AMapMarker marker; + + public AddMapMarkerParams(AMapMarker marker) { + this.marker = marker; + } + + public AddMapMarkerParams(Parcel in) { + readFromParcel(in); + } + + public static final Parcelable.Creator CREATOR = new + Parcelable.Creator() { + public AddMapMarkerParams createFromParcel(Parcel in) { + return new AddMapMarkerParams(in); + } + + public AddMapMarkerParams[] newArray(int size) { + return new AddMapMarkerParams[size]; + } + }; + + public AMapMarker getMarker() { + return marker; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeParcelable(marker, flags); + } + + private void readFromParcel(Parcel in) { + marker = in.readParcelable(AMapMarker.class.getClassLoader()); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/RemoveMapMarkerParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/RemoveMapMarkerParams.aidl new file mode 100644 index 0000000000..e5b5b126ad --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/RemoveMapMarkerParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.mapmarker; + +parcelable RemoveMapMarkerParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/RemoveMapMarkerParams.java b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/RemoveMapMarkerParams.java new file mode 100644 index 0000000000..08f489922c --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/RemoveMapMarkerParams.java @@ -0,0 +1,44 @@ +package net.osmand.aidl.mapmarker; + +import android.os.Parcel; +import android.os.Parcelable; + +public class RemoveMapMarkerParams implements Parcelable { + + private AMapMarker marker; + + public RemoveMapMarkerParams(AMapMarker marker) { + this.marker = marker; + } + + public RemoveMapMarkerParams(Parcel in) { + readFromParcel(in); + } + + public static final Parcelable.Creator CREATOR = new + Parcelable.Creator() { + public RemoveMapMarkerParams createFromParcel(Parcel in) { + return new RemoveMapMarkerParams(in); + } + + public RemoveMapMarkerParams[] newArray(int size) { + return new RemoveMapMarkerParams[size]; + } + }; + + public AMapMarker getMarker() { + return marker; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeParcelable(marker, flags); + } + + private void readFromParcel(Parcel in) { + marker = in.readParcelable(AMapMarker.class.getClassLoader()); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/RemoveMapMarkersParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/RemoveMapMarkersParams.aidl new file mode 100644 index 0000000000..ee5f4936d7 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/RemoveMapMarkersParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.mapmarker; + +parcelable RemoveMapMarkersParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/RemoveMapMarkersParams.java b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/RemoveMapMarkersParams.java new file mode 100644 index 0000000000..cf0ea8d00c --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/RemoveMapMarkersParams.java @@ -0,0 +1,37 @@ +package net.osmand.aidl.mapmarker; + +import android.os.Parcel; +import android.os.Parcelable; + +public class RemoveMapMarkersParams implements Parcelable { + + + public RemoveMapMarkersParams() { + } + + public RemoveMapMarkersParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + public RemoveMapMarkersParams createFromParcel(Parcel in) { + return new RemoveMapMarkersParams(in); + } + + public RemoveMapMarkersParams[] newArray(int size) { + return new RemoveMapMarkersParams[size]; + } + }; + + + public void writeToParcel(Parcel out, int flags) { + } + + private void readFromParcel(Parcel in) { + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/UpdateMapMarkerParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/UpdateMapMarkerParams.aidl new file mode 100644 index 0000000000..2a17fa9369 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/UpdateMapMarkerParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.mapmarker; + +parcelable UpdateMapMarkerParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/UpdateMapMarkerParams.java b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/UpdateMapMarkerParams.java new file mode 100644 index 0000000000..d03bc0d7f6 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/UpdateMapMarkerParams.java @@ -0,0 +1,52 @@ +package net.osmand.aidl.mapmarker; + +import android.os.Parcel; +import android.os.Parcelable; + +public class UpdateMapMarkerParams implements Parcelable { + + private AMapMarker markerPrev; + private AMapMarker markerNew; + + public UpdateMapMarkerParams(AMapMarker markerPrev, AMapMarker markerNew) { + this.markerPrev = markerPrev; + this.markerNew = markerNew; + } + + public UpdateMapMarkerParams(Parcel in) { + readFromParcel(in); + } + + public static final Parcelable.Creator CREATOR = new + Parcelable.Creator() { + public UpdateMapMarkerParams createFromParcel(Parcel in) { + return new UpdateMapMarkerParams(in); + } + + public UpdateMapMarkerParams[] newArray(int size) { + return new UpdateMapMarkerParams[size]; + } + }; + + public AMapMarker getMarkerPrev() { + return markerPrev; + } + + public AMapMarker getMarkerNew() { + return markerNew; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeParcelable(markerPrev, flags); + out.writeParcelable(markerNew, flags); + } + + private void readFromParcel(Parcel in) { + markerPrev = in.readParcelable(AMapMarker.class.getClassLoader()); + markerNew = in.readParcelable(AMapMarker.class.getClassLoader()); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/AMapWidget.aidl b/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/AMapWidget.aidl new file mode 100644 index 0000000000..7798986483 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/AMapWidget.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.mapwidget; + +parcelable AMapWidget; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/AMapWidget.java b/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/AMapWidget.java new file mode 100644 index 0000000000..f6fac08942 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/AMapWidget.java @@ -0,0 +1,110 @@ +package net.osmand.aidl.mapwidget; + +import android.content.Intent; +import android.os.Parcel; +import android.os.Parcelable; + +public class AMapWidget implements Parcelable { + private String id; + private String menuIconName; + private String menuTitle; + private String lightIconName; + private String darkIconName; + private String text; + private String description; + private int order; + private Intent intentOnClick; + + public AMapWidget(String id, String menuIconName, String menuTitle, + String lightIconName, String darkIconName, String text, String description, + int order, Intent intentOnClick) { + this.id = id; + this.menuIconName = menuIconName; + this.menuTitle = menuTitle; + this.lightIconName = lightIconName; + this.darkIconName = darkIconName; + this.text = text; + this.description = description; + this.order = order; + this.intentOnClick = intentOnClick; + } + + public AMapWidget(Parcel in) { + readFromParcel(in); + } + + public static final Parcelable.Creator CREATOR = new + Parcelable.Creator() { + public AMapWidget createFromParcel(Parcel in) { + return new AMapWidget(in); + } + + public AMapWidget[] newArray(int size) { + return new AMapWidget[size]; + } + }; + + public String getId() { + return id; + } + + public String getMenuIconName() { + return menuIconName; + } + + public String getMenuTitle() { + return menuTitle; + } + + public String getLightIconName() { + return lightIconName; + } + + public String getDarkIconName() { + return darkIconName; + } + + public String getText() { + return text; + } + + public String getDescription() { + return description; + } + + public int getOrder() { + return order; + } + + public Intent getIntentOnClick() { + return intentOnClick; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeString(id); + out.writeString(menuIconName); + out.writeString(menuTitle); + out.writeString(lightIconName); + out.writeString(darkIconName); + out.writeString(text); + out.writeString(description); + out.writeInt(order); + out.writeParcelable(intentOnClick, flags); + } + + private void readFromParcel(Parcel in) { + id = in.readString(); + menuIconName = in.readString(); + menuTitle = in.readString(); + lightIconName = in.readString(); + darkIconName = in.readString(); + text = in.readString(); + description = in.readString(); + order = in.readInt(); + intentOnClick = in.readParcelable(Intent.class.getClassLoader()); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/AddMapWidgetParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/AddMapWidgetParams.aidl new file mode 100644 index 0000000000..891d338eb8 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/AddMapWidgetParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.mapwidget; + +parcelable AddMapWidgetParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/AddMapWidgetParams.java b/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/AddMapWidgetParams.java new file mode 100644 index 0000000000..69b337209e --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/AddMapWidgetParams.java @@ -0,0 +1,43 @@ +package net.osmand.aidl.mapwidget; + +import android.os.Parcel; +import android.os.Parcelable; + +public class AddMapWidgetParams implements Parcelable { + private AMapWidget widget; + + public AddMapWidgetParams(AMapWidget widget) { + this.widget = widget; + } + + public AddMapWidgetParams(Parcel in) { + readFromParcel(in); + } + + public static final Parcelable.Creator CREATOR = new + Parcelable.Creator() { + public AddMapWidgetParams createFromParcel(Parcel in) { + return new AddMapWidgetParams(in); + } + + public AddMapWidgetParams[] newArray(int size) { + return new AddMapWidgetParams[size]; + } + }; + + public AMapWidget getWidget() { + return widget; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeParcelable(widget, flags); + } + + private void readFromParcel(Parcel in) { + widget = in.readParcelable(AMapWidget.class.getClassLoader()); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/RemoveMapWidgetParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/RemoveMapWidgetParams.aidl new file mode 100644 index 0000000000..445b0c994d --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/RemoveMapWidgetParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.mapwidget; + +parcelable RemoveMapWidgetParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/RemoveMapWidgetParams.java b/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/RemoveMapWidgetParams.java new file mode 100644 index 0000000000..e1433d530c --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/RemoveMapWidgetParams.java @@ -0,0 +1,43 @@ +package net.osmand.aidl.mapwidget; + +import android.os.Parcel; +import android.os.Parcelable; + +public class RemoveMapWidgetParams implements Parcelable { + private String id; + + public RemoveMapWidgetParams(String id) { + this.id = id; + } + + public RemoveMapWidgetParams(Parcel in) { + readFromParcel(in); + } + + public static final Parcelable.Creator CREATOR = new + Parcelable.Creator() { + public RemoveMapWidgetParams createFromParcel(Parcel in) { + return new RemoveMapWidgetParams(in); + } + + public RemoveMapWidgetParams[] newArray(int size) { + return new RemoveMapWidgetParams[size]; + } + }; + + public String getId() { + return id; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeString(id); + } + + private void readFromParcel(Parcel in) { + id = in.readString(); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/UpdateMapWidgetParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/UpdateMapWidgetParams.aidl new file mode 100644 index 0000000000..b92f94c008 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/UpdateMapWidgetParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.mapwidget; + +parcelable UpdateMapWidgetParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/UpdateMapWidgetParams.java b/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/UpdateMapWidgetParams.java new file mode 100644 index 0000000000..07114ad16e --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/mapwidget/UpdateMapWidgetParams.java @@ -0,0 +1,43 @@ +package net.osmand.aidl.mapwidget; + +import android.os.Parcel; +import android.os.Parcelable; + +public class UpdateMapWidgetParams implements Parcelable { + private AMapWidget widget; + + public UpdateMapWidgetParams(AMapWidget widget) { + this.widget = widget; + } + + public UpdateMapWidgetParams(Parcel in) { + readFromParcel(in); + } + + public static final Parcelable.Creator CREATOR = new + Parcelable.Creator() { + public UpdateMapWidgetParams createFromParcel(Parcel in) { + return new UpdateMapWidgetParams(in); + } + + public UpdateMapWidgetParams[] newArray(int size) { + return new UpdateMapWidgetParams[size]; + } + }; + + public AMapWidget getWidget() { + return widget; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeParcelable(widget, flags); + } + + private void readFromParcel(Parcel in) { + widget = in.readParcelable(AMapWidget.class.getClassLoader()); + } + + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerFooterParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerFooterParams.aidl new file mode 100644 index 0000000000..fc1271a8ca --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerFooterParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.navdrawer; + +parcelable NavDrawerFooterParams; diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerFooterParams.java b/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerFooterParams.java new file mode 100644 index 0000000000..9bfd70193f --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerFooterParams.java @@ -0,0 +1,68 @@ +package net.osmand.aidl.navdrawer; + +import android.os.Parcel; +import android.os.Parcelable; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; + +public class NavDrawerFooterParams implements Parcelable { + + @NonNull + private String packageName; + @Nullable + private String intent; + @Nullable + private String appName; + + @NonNull + public String getPackageName() { + return packageName; + } + + @Nullable + public String getIntent() { + return intent; + } + + @Nullable + public String getAppName() { + return appName; + } + + public NavDrawerFooterParams(@NonNull String packageName, @Nullable String intent, + @Nullable String appName) { + this.packageName = packageName; + this.intent = intent; + this.appName = appName; + } + + protected NavDrawerFooterParams(Parcel in) { + packageName = in.readString(); + intent = in.readString(); + appName = in.readString(); + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + dest.writeString(packageName); + dest.writeString(intent); + dest.writeString(appName); + } + + @Override + public int describeContents() { + return 0; + } + + public static final Creator CREATOR = new Creator() { + @Override + public NavDrawerFooterParams createFromParcel(Parcel in) { + return new NavDrawerFooterParams(in); + } + + @Override + public NavDrawerFooterParams[] newArray(int size) { + return new NavDrawerFooterParams[size]; + } + }; +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerHeaderParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerHeaderParams.aidl new file mode 100644 index 0000000000..c230824841 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerHeaderParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.navdrawer; + +parcelable NavDrawerHeaderParams; diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerHeaderParams.java b/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerHeaderParams.java new file mode 100644 index 0000000000..c88950fd10 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerHeaderParams.java @@ -0,0 +1,68 @@ +package net.osmand.aidl.navdrawer; + +import android.os.Parcel; +import android.os.Parcelable; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; + +public class NavDrawerHeaderParams implements Parcelable { + + @NonNull + private String imageUri; + @NonNull + private String packageName; + @Nullable + private String intent; + + @NonNull + public String getImageUri() { + return imageUri; + } + + @NonNull + public String getPackageName() { + return packageName; + } + + @Nullable + public String getIntent() { + return intent; + } + + public NavDrawerHeaderParams(@NonNull String imageUri, @NonNull String packageName, + @Nullable String intent) { + this.imageUri = imageUri; + this.packageName = packageName; + this.intent = intent; + } + + public NavDrawerHeaderParams(Parcel in) { + imageUri = in.readString(); + packageName = in.readString(); + intent = in.readString(); + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + dest.writeString(imageUri); + dest.writeString(packageName); + dest.writeString(intent); + } + + @Override + public int describeContents() { + return 0; + } + + public static final Creator CREATOR = new Creator() { + @Override + public NavDrawerHeaderParams createFromParcel(Parcel in) { + return new NavDrawerHeaderParams(in); + } + + @Override + public NavDrawerHeaderParams[] newArray(int size) { + return new NavDrawerHeaderParams[size]; + } + }; +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerItem.aidl b/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerItem.aidl new file mode 100644 index 0000000000..082061b7f1 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerItem.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.navdrawer; + +parcelable NavDrawerItem; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerItem.java b/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerItem.java new file mode 100644 index 0000000000..aedc585b65 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerItem.java @@ -0,0 +1,73 @@ +package net.osmand.aidl.navdrawer; + +import android.os.Parcel; +import android.os.Parcelable; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; + +public class NavDrawerItem implements Parcelable { + + private String name; + private String uri; + private String iconName; + private int flags; + + public NavDrawerItem(@NonNull String name, @NonNull String uri, @Nullable String iconName) { + this(name, uri, iconName, -1); + } + + public NavDrawerItem(@NonNull String name, @NonNull String uri, @Nullable String iconName, int flags) { + this.name = name; + this.uri = uri; + this.iconName = iconName; + this.flags = flags; + } + + protected NavDrawerItem(Parcel in) { + name = in.readString(); + uri = in.readString(); + iconName = in.readString(); + flags = in.readInt(); + } + + public String getName() { + return name; + } + + public String getUri() { + return uri; + } + + public String getIconName() { + return iconName; + } + + public int getFlags() { + return flags; + } + + @Override + public void writeToParcel(Parcel dest, int f) { + dest.writeString(name); + dest.writeString(uri); + dest.writeString(iconName); + dest.writeInt(flags); + } + + @Override + public int describeContents() { + return 0; + } + + public static final Creator CREATOR = new Creator() { + @Override + public NavDrawerItem createFromParcel(Parcel in) { + return new NavDrawerItem(in); + } + + @Override + public NavDrawerItem[] newArray(int size) { + return new NavDrawerItem[size]; + } + }; +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/SetNavDrawerItemsParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/SetNavDrawerItemsParams.aidl new file mode 100644 index 0000000000..1d34a5cdc5 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/SetNavDrawerItemsParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.navdrawer; + +parcelable SetNavDrawerItemsParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/SetNavDrawerItemsParams.java b/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/SetNavDrawerItemsParams.java new file mode 100644 index 0000000000..783a76eb7b --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/SetNavDrawerItemsParams.java @@ -0,0 +1,56 @@ +package net.osmand.aidl.navdrawer; + +import android.os.Parcel; +import android.os.Parcelable; +import android.support.annotation.NonNull; + +import java.util.ArrayList; +import java.util.List; + +public class SetNavDrawerItemsParams implements Parcelable { + + private String appPackage; + private List items; + + public SetNavDrawerItemsParams(@NonNull String appPackage, @NonNull List items) { + this.appPackage = appPackage; + this.items = items; + } + + protected SetNavDrawerItemsParams(Parcel in) { + appPackage = in.readString(); + items = new ArrayList<>(); + in.readTypedList(items, NavDrawerItem.CREATOR); + } + + public String getAppPackage() { + return appPackage; + } + + public List getItems() { + return items; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + dest.writeString(appPackage); + dest.writeTypedList(new ArrayList<>(items)); + } + + @Override + public int describeContents() { + return 0; + } + + public static final Creator CREATOR = new Creator() { + @Override + public SetNavDrawerItemsParams createFromParcel(Parcel in) { + return new SetNavDrawerItemsParams(in); + } + + @Override + public SetNavDrawerItemsParams[] newArray(int size) { + return new SetNavDrawerItemsParams[size]; + } + }; +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/ADirectionInfo.aidl b/OsmAnd-telegram/src/net/osmand/aidl/navigation/ADirectionInfo.aidl new file mode 100644 index 0000000000..b0793d6e1a --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/ADirectionInfo.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.navigation; + +parcelable ADirectionInfo; diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/ADirectionInfo.java b/OsmAnd-telegram/src/net/osmand/aidl/navigation/ADirectionInfo.java new file mode 100644 index 0000000000..a5e7074f0e --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/ADirectionInfo.java @@ -0,0 +1,73 @@ +package net.osmand.aidl.navigation; + +import android.os.Parcel; +import android.os.Parcelable; + +public class ADirectionInfo implements Parcelable { + + private int distanceTo; //distance to next turn + private int turnType; //turn type + private boolean isLeftSide; //is movement left-sided + + public ADirectionInfo(int distanceTo, int turnType, boolean isLeftSide) { + this.distanceTo = distanceTo; + this.turnType = turnType; + this.isLeftSide = isLeftSide; + } + + protected ADirectionInfo(Parcel in) { + distanceTo = in.readInt(); + turnType = in.readInt(); + isLeftSide = in.readByte() != 0; + } + + public static final Creator CREATOR = new Creator() { + @Override + public ADirectionInfo createFromParcel(Parcel in) { + return new ADirectionInfo(in); + } + + @Override + public ADirectionInfo[] newArray(int size) { + return new ADirectionInfo[size]; + } + }; + + public int getDistanceTo() { + return distanceTo; + } + + public int getTurnType() { + return turnType; + } + + public boolean isLeftSide() { + return isLeftSide; + } + + public void setDistanceTo(int distanceTo) { + this.distanceTo = distanceTo; + } + + public void setTurnType(int turnType) { + this.turnType = turnType; + } + + public void setLeftSide(boolean leftSide) { + isLeftSide = leftSide; + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + dest.writeInt(distanceTo); + dest.writeInt(turnType); + dest.writeByte((byte) (isLeftSide ? 1 : 0)); + } + + +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationUpdateParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationUpdateParams.aidl new file mode 100644 index 0000000000..43f370d024 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationUpdateParams.aidl @@ -0,0 +1,4 @@ + +package net.osmand.aidl.navigation; + +parcelable ANavigationUpdateParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationUpdateParams.java b/OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationUpdateParams.java new file mode 100644 index 0000000000..38c8f5ffe4 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationUpdateParams.java @@ -0,0 +1,57 @@ +package net.osmand.aidl.navigation; + +import android.os.Parcel; +import android.os.Parcelable; + +public class ANavigationUpdateParams implements Parcelable { + + private boolean subscribeToUpdates = true; + private long callbackId = -1L; + + public ANavigationUpdateParams() { + } + + public long getCallbackId() { + return callbackId; + } + + public void setCallbackId(long callbackId) { + this.callbackId = callbackId; + } + + public void setSubscribeToUpdates(boolean subscribeToUpdates) { + this.subscribeToUpdates = subscribeToUpdates; + } + + public boolean isSubscribeToUpdates() { + return subscribeToUpdates; + } + + protected ANavigationUpdateParams(Parcel in) { + callbackId = in.readLong(); + subscribeToUpdates = in.readByte() != 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + dest.writeLong(callbackId); + dest.writeByte((byte) (subscribeToUpdates ? 1 : 0)); + } + + @Override + public int describeContents() { + return 0; + } + + public static final Creator CREATOR = new Creator() { + @Override + public ANavigationUpdateParams createFromParcel(Parcel in) { + return new ANavigationUpdateParams(in); + } + + @Override + public ANavigationUpdateParams[] newArray(int size) { + return new ANavigationUpdateParams[size]; + } + }; +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationVoiceRouterMessageParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationVoiceRouterMessageParams.aidl new file mode 100644 index 0000000000..6dfbe239ae --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationVoiceRouterMessageParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.navigation; + +parcelable ANavigationVoiceRouterMessageParams; diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationVoiceRouterMessageParams.java b/OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationVoiceRouterMessageParams.java new file mode 100644 index 0000000000..196380729f --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationVoiceRouterMessageParams.java @@ -0,0 +1,56 @@ +package net.osmand.aidl.navigation; + +import android.os.Parcel; +import android.os.Parcelable; + +public class ANavigationVoiceRouterMessageParams implements Parcelable{ + private boolean subscribeToUpdates = true; + private long callbackId = -1L; + + public ANavigationVoiceRouterMessageParams() { + } + + public long getCallbackId() { + return callbackId; + } + + public void setCallbackId(long callbackId) { + this.callbackId = callbackId; + } + + public void setSubscribeToUpdates(boolean subscribeToUpdates) { + this.subscribeToUpdates = subscribeToUpdates; + } + + public boolean isSubscribeToUpdates() { + return subscribeToUpdates; + } + + protected ANavigationVoiceRouterMessageParams(Parcel in) { + callbackId = in.readLong(); + subscribeToUpdates = in.readByte() != 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + dest.writeLong(callbackId); + dest.writeByte((byte) (subscribeToUpdates ? 1 : 0)); + } + + @Override + public int describeContents() { + return 0; + } + + public static final Creator CREATOR = new Creator() { + @Override + public ANavigationVoiceRouterMessageParams createFromParcel(Parcel in) { + return new ANavigationVoiceRouterMessageParams(in); + } + + @Override + public ANavigationVoiceRouterMessageParams[] newArray(int size) { + return new ANavigationVoiceRouterMessageParams[size]; + } + }; +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/MuteNavigationParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/navigation/MuteNavigationParams.aidl new file mode 100644 index 0000000000..d1205adaf3 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/MuteNavigationParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.navigation; + +parcelable MuteNavigationParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/MuteNavigationParams.java b/OsmAnd-telegram/src/net/osmand/aidl/navigation/MuteNavigationParams.java new file mode 100644 index 0000000000..8965c415fa --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/MuteNavigationParams.java @@ -0,0 +1,38 @@ +package net.osmand.aidl.navigation; + +import android.os.Parcel; +import android.os.Parcelable; + +public class MuteNavigationParams implements Parcelable { + + public MuteNavigationParams() { + } + + public MuteNavigationParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public MuteNavigationParams createFromParcel(Parcel in) { + return new MuteNavigationParams(in); + } + + @Override + public MuteNavigationParams[] newArray(int size) { + return new MuteNavigationParams[size]; + } + }; + + @Override + public void writeToParcel(Parcel out, int flags) { + } + + private void readFromParcel(Parcel in) { + } + + @Override + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateGpxParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateGpxParams.aidl new file mode 100644 index 0000000000..dea59ed048 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateGpxParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.navigation; + +parcelable NavigateGpxParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateGpxParams.java b/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateGpxParams.java new file mode 100644 index 0000000000..6e8fb8efe7 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateGpxParams.java @@ -0,0 +1,69 @@ +package net.osmand.aidl.navigation; + +import android.net.Uri; +import android.os.Parcel; +import android.os.Parcelable; + +public class NavigateGpxParams implements Parcelable { + + private String data; + private Uri uri; + private boolean force; + + public NavigateGpxParams(String data, boolean force) { + this.data = data; + this.force = force; + } + + public NavigateGpxParams(Uri uri, boolean force) { + this.uri = uri; + this.force = force; + } + + public NavigateGpxParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public NavigateGpxParams createFromParcel(Parcel in) { + return new NavigateGpxParams(in); + } + + @Override + public NavigateGpxParams[] newArray(int size) { + return new NavigateGpxParams[size]; + } + }; + + public String getData() { + return data; + } + + public Uri getUri() { + return uri; + } + + public boolean isForce() { + return force; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeString(data); + out.writeParcelable(uri, flags); + out.writeByte((byte) (force ? 1 : 0)); + } + + private void readFromParcel(Parcel in) { + data = in.readString(); + uri = in.readParcelable(Uri.class.getClassLoader()); + force = in.readByte() != 0; + } + + @Override + public int describeContents() { + return 0; + } + +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateParams.aidl new file mode 100644 index 0000000000..f9b51d7a8c --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.navigation; + +parcelable NavigateParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateParams.java b/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateParams.java new file mode 100644 index 0000000000..8b0bdeb1eb --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateParams.java @@ -0,0 +1,104 @@ +package net.osmand.aidl.navigation; + +import android.os.Parcel; +import android.os.Parcelable; + +public class NavigateParams implements Parcelable { + + private String startName; + private double startLat; + private double startLon; + private String destName; + private double destLat; + private double destLon; + private String profile; + private boolean force; + + public NavigateParams(String startName, double startLat, double startLon, String destName, double destLat, double destLon, String profile, boolean force) { + this.startName = startName; + this.startLat = startLat; + this.startLon = startLon; + this.destName = destName; + this.destLat = destLat; + this.destLon = destLon; + this.profile = profile; + this.force = force; + } + + public NavigateParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public NavigateParams createFromParcel(Parcel in) { + return new NavigateParams(in); + } + + @Override + public NavigateParams[] newArray(int size) { + return new NavigateParams[size]; + } + }; + + public String getStartName() { + return startName; + } + + public double getStartLat() { + return startLat; + } + + public double getStartLon() { + return startLon; + } + + public String getDestName() { + return destName; + } + + public double getDestLat() { + return destLat; + } + + public double getDestLon() { + return destLon; + } + + public String getProfile() { + return profile; + } + + public boolean isForce() { + return force; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeString(startName); + out.writeDouble(startLat); + out.writeDouble(startLon); + out.writeString(destName); + out.writeDouble(destLat); + out.writeDouble(destLon); + out.writeString(profile); + out.writeByte((byte) (force ? 1 : 0)); + } + + private void readFromParcel(Parcel in) { + startName = in.readString(); + startLat = in.readDouble(); + startLon = in.readDouble(); + destName = in.readString(); + destLat = in.readDouble(); + destLon = in.readDouble(); + profile = in.readString(); + force = in.readByte() != 0; + } + + @Override + public int describeContents() { + return 0; + } + +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateSearchParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateSearchParams.aidl new file mode 100644 index 0000000000..57433b8fde --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateSearchParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.navigation; + +parcelable NavigateSearchParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateSearchParams.java b/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateSearchParams.java new file mode 100644 index 0000000000..b092bcd4eb --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateSearchParams.java @@ -0,0 +1,106 @@ +package net.osmand.aidl.navigation; + +import android.os.Parcel; +import android.os.Parcelable; + +public class NavigateSearchParams implements Parcelable { + + private String startName; + private double startLat; + private double startLon; + private String searchQuery; + private double searchLat; + private double searchLon; + private String profile; + private boolean force; + + public NavigateSearchParams(String startName, double startLat, double startLon, + String searchQuery, double searchLat, double searchLon, + String profile, boolean force) { + this.startName = startName; + this.startLat = startLat; + this.startLon = startLon; + this.searchQuery = searchQuery; + this.searchLat = searchLat; + this.searchLon = searchLon; + this.profile = profile; + this.force = force; + } + + public NavigateSearchParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public NavigateSearchParams createFromParcel(Parcel in) { + return new NavigateSearchParams(in); + } + + @Override + public NavigateSearchParams[] newArray(int size) { + return new NavigateSearchParams[size]; + } + }; + + public String getStartName() { + return startName; + } + + public double getStartLat() { + return startLat; + } + + public double getStartLon() { + return startLon; + } + + public String getSearchQuery() { + return searchQuery; + } + + public double getSearchLat() { + return searchLat; + } + + public double getSearchLon() { + return searchLon; + } + + public String getProfile() { + return profile; + } + + public boolean isForce() { + return force; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeString(startName); + out.writeDouble(startLat); + out.writeDouble(startLon); + out.writeString(searchQuery); + out.writeString(profile); + out.writeByte((byte) (force ? 1 : 0)); + out.writeDouble(searchLat); + out.writeDouble(searchLon); + } + + private void readFromParcel(Parcel in) { + startName = in.readString(); + startLat = in.readDouble(); + startLon = in.readDouble(); + searchQuery = in.readString(); + profile = in.readString(); + force = in.readByte() != 0; + searchLat = in.readDouble(); + searchLon = in.readDouble(); + } + + @Override + public int describeContents() { + return 0; + } + +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/OnVoiceNavigationParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/navigation/OnVoiceNavigationParams.aidl new file mode 100644 index 0000000000..53ab4f6a5c --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/OnVoiceNavigationParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.navigation; + +parcelable OnVoiceNavigationParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/OnVoiceNavigationParams.java b/OsmAnd-telegram/src/net/osmand/aidl/navigation/OnVoiceNavigationParams.java new file mode 100644 index 0000000000..20fd34e13e --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/OnVoiceNavigationParams.java @@ -0,0 +1,57 @@ +package net.osmand.aidl.navigation; + +import android.os.Parcel; +import android.os.Parcelable; + +import java.util.ArrayList; +import java.util.List; + +public class OnVoiceNavigationParams implements Parcelable { + + private List cmds; + private List played; + + public OnVoiceNavigationParams() { + cmds = new ArrayList<>(); + played = new ArrayList<>(); + } + + public OnVoiceNavigationParams(List cmds, List played) { + this.cmds = cmds; + this.played = played; + } + + public OnVoiceNavigationParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public OnVoiceNavigationParams createFromParcel(Parcel in) { + return new OnVoiceNavigationParams(in); + } + + @Override + public OnVoiceNavigationParams[] newArray(int size) { + return new OnVoiceNavigationParams[size]; + } + }; + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeStringList(cmds); + out.writeStringList(played); + } + + private void readFromParcel(Parcel in) { + cmds = new ArrayList<>(); + in.readStringList(cmds); + played = new ArrayList<>(); + in.readStringList(played); + } + + @Override + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/PauseNavigationParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/navigation/PauseNavigationParams.aidl new file mode 100644 index 0000000000..0a18566304 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/PauseNavigationParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.navigation; + +parcelable PauseNavigationParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/PauseNavigationParams.java b/OsmAnd-telegram/src/net/osmand/aidl/navigation/PauseNavigationParams.java new file mode 100644 index 0000000000..5a28538039 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/PauseNavigationParams.java @@ -0,0 +1,38 @@ +package net.osmand.aidl.navigation; + +import android.os.Parcel; +import android.os.Parcelable; + +public class PauseNavigationParams implements Parcelable { + + public PauseNavigationParams() { + } + + public PauseNavigationParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public PauseNavigationParams createFromParcel(Parcel in) { + return new PauseNavigationParams(in); + } + + @Override + public PauseNavigationParams[] newArray(int size) { + return new PauseNavigationParams[size]; + } + }; + + @Override + public void writeToParcel(Parcel out, int flags) { + } + + private void readFromParcel(Parcel in) { + } + + @Override + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/ResumeNavigationParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/navigation/ResumeNavigationParams.aidl new file mode 100644 index 0000000000..4dcf619aaa --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/ResumeNavigationParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.navigation; + +parcelable ResumeNavigationParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/ResumeNavigationParams.java b/OsmAnd-telegram/src/net/osmand/aidl/navigation/ResumeNavigationParams.java new file mode 100644 index 0000000000..d1032dc914 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/ResumeNavigationParams.java @@ -0,0 +1,38 @@ +package net.osmand.aidl.navigation; + +import android.os.Parcel; +import android.os.Parcelable; + +public class ResumeNavigationParams implements Parcelable { + + public ResumeNavigationParams() { + } + + public ResumeNavigationParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public ResumeNavigationParams createFromParcel(Parcel in) { + return new ResumeNavigationParams(in); + } + + @Override + public ResumeNavigationParams[] newArray(int size) { + return new ResumeNavigationParams[size]; + } + }; + + @Override + public void writeToParcel(Parcel out, int flags) { + } + + private void readFromParcel(Parcel in) { + } + + @Override + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/StopNavigationParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/navigation/StopNavigationParams.aidl new file mode 100644 index 0000000000..5ba45bdf50 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/StopNavigationParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.navigation; + +parcelable StopNavigationParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/StopNavigationParams.java b/OsmAnd-telegram/src/net/osmand/aidl/navigation/StopNavigationParams.java new file mode 100644 index 0000000000..e87d6ed2da --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/StopNavigationParams.java @@ -0,0 +1,38 @@ +package net.osmand.aidl.navigation; + +import android.os.Parcel; +import android.os.Parcelable; + +public class StopNavigationParams implements Parcelable { + + public StopNavigationParams() { + } + + public StopNavigationParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public StopNavigationParams createFromParcel(Parcel in) { + return new StopNavigationParams(in); + } + + @Override + public StopNavigationParams[] newArray(int size) { + return new StopNavigationParams[size]; + } + }; + + @Override + public void writeToParcel(Parcel out, int flags) { + } + + private void readFromParcel(Parcel in) { + } + + @Override + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/UnmuteNavigationParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/navigation/UnmuteNavigationParams.aidl new file mode 100644 index 0000000000..7512bbcf34 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/UnmuteNavigationParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.navigation; + +parcelable UnmuteNavigationParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/UnmuteNavigationParams.java b/OsmAnd-telegram/src/net/osmand/aidl/navigation/UnmuteNavigationParams.java new file mode 100644 index 0000000000..36819db065 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/navigation/UnmuteNavigationParams.java @@ -0,0 +1,38 @@ +package net.osmand.aidl.navigation; + +import android.os.Parcel; +import android.os.Parcelable; + +public class UnmuteNavigationParams implements Parcelable { + + public UnmuteNavigationParams() { + } + + public UnmuteNavigationParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public UnmuteNavigationParams createFromParcel(Parcel in) { + return new UnmuteNavigationParams(in); + } + + @Override + public UnmuteNavigationParams[] newArray(int size) { + return new UnmuteNavigationParams[size]; + } + }; + + @Override + public void writeToParcel(Parcel out, int flags) { + } + + private void readFromParcel(Parcel in) { + } + + @Override + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/note/StartAudioRecordingParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/note/StartAudioRecordingParams.aidl new file mode 100644 index 0000000000..bb16dea140 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/note/StartAudioRecordingParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.note; + +parcelable StartAudioRecordingParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/note/StartAudioRecordingParams.java b/OsmAnd-telegram/src/net/osmand/aidl/note/StartAudioRecordingParams.java new file mode 100644 index 0000000000..c2800feb9c --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/note/StartAudioRecordingParams.java @@ -0,0 +1,56 @@ +package net.osmand.aidl.note; + +import android.os.Parcel; +import android.os.Parcelable; + +public class StartAudioRecordingParams implements Parcelable { + + private double latitude; + private double longitude; + + public StartAudioRecordingParams(double latitude, double longitude) { + this.latitude = latitude; + this.longitude = longitude; + } + + public StartAudioRecordingParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public StartAudioRecordingParams createFromParcel(Parcel in) { + return new StartAudioRecordingParams(in); + } + + @Override + public StartAudioRecordingParams[] newArray(int size) { + return new StartAudioRecordingParams[size]; + } + }; + + public double getLatitude() { + return latitude; + } + + public double getLongitude() { + return longitude; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeDouble(latitude); + out.writeDouble(longitude); + } + + private void readFromParcel(Parcel in) { + latitude = in.readDouble(); + longitude = in.readDouble(); + } + + @Override + public int describeContents() { + return 0; + } + +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/note/StartVideoRecordingParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/note/StartVideoRecordingParams.aidl new file mode 100644 index 0000000000..082b68e09c --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/note/StartVideoRecordingParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.note; + +parcelable StartVideoRecordingParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/note/StartVideoRecordingParams.java b/OsmAnd-telegram/src/net/osmand/aidl/note/StartVideoRecordingParams.java new file mode 100644 index 0000000000..aee86ea9de --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/note/StartVideoRecordingParams.java @@ -0,0 +1,56 @@ +package net.osmand.aidl.note; + +import android.os.Parcel; +import android.os.Parcelable; + +public class StartVideoRecordingParams implements Parcelable { + + private double latitude; + private double longitude; + + public StartVideoRecordingParams(double latitude, double longitude) { + this.latitude = latitude; + this.longitude = longitude; + } + + public StartVideoRecordingParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public StartVideoRecordingParams createFromParcel(Parcel in) { + return new StartVideoRecordingParams(in); + } + + @Override + public StartVideoRecordingParams[] newArray(int size) { + return new StartVideoRecordingParams[size]; + } + }; + + public double getLatitude() { + return latitude; + } + + public double getLongitude() { + return longitude; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeDouble(latitude); + out.writeDouble(longitude); + } + + private void readFromParcel(Parcel in) { + latitude = in.readDouble(); + longitude = in.readDouble(); + } + + @Override + public int describeContents() { + return 0; + } + +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/note/StopRecordingParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/note/StopRecordingParams.aidl new file mode 100644 index 0000000000..4111efbcb6 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/note/StopRecordingParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.note; + +parcelable StopRecordingParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/note/StopRecordingParams.java b/OsmAnd-telegram/src/net/osmand/aidl/note/StopRecordingParams.java new file mode 100644 index 0000000000..b56a42504b --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/note/StopRecordingParams.java @@ -0,0 +1,42 @@ +package net.osmand.aidl.note; + +import android.os.Parcel; +import android.os.Parcelable; + +public class StopRecordingParams implements Parcelable { + + public StopRecordingParams() { + + } + + public StopRecordingParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public StopRecordingParams createFromParcel(Parcel in) { + return new StopRecordingParams(in); + } + + @Override + public StopRecordingParams[] newArray(int size) { + return new StopRecordingParams[size]; + } + }; + + @Override + public void writeToParcel(Parcel out, int flags) { + + } + + private void readFromParcel(Parcel in) { + + } + + @Override + public int describeContents() { + return 0; + } + +} \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/note/TakePhotoNoteParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/note/TakePhotoNoteParams.aidl new file mode 100644 index 0000000000..3c09d62c41 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/note/TakePhotoNoteParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.note; + +parcelable TakePhotoNoteParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/note/TakePhotoNoteParams.java b/OsmAnd-telegram/src/net/osmand/aidl/note/TakePhotoNoteParams.java new file mode 100644 index 0000000000..254516e080 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/note/TakePhotoNoteParams.java @@ -0,0 +1,56 @@ +package net.osmand.aidl.note; + +import android.os.Parcel; +import android.os.Parcelable; + +public class TakePhotoNoteParams implements Parcelable { + + private double latitude; + private double longitude; + + public TakePhotoNoteParams(double latitude, double longitude) { + this.latitude = latitude; + this.longitude = longitude; + } + + public TakePhotoNoteParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public TakePhotoNoteParams createFromParcel(Parcel in) { + return new TakePhotoNoteParams(in); + } + + @Override + public TakePhotoNoteParams[] newArray(int size) { + return new TakePhotoNoteParams[size]; + } + }; + + public double getLatitude() { + return latitude; + } + + public double getLongitude() { + return longitude; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeDouble(latitude); + out.writeDouble(longitude); + } + + private void readFromParcel(Parcel in) { + latitude = in.readDouble(); + longitude = in.readDouble(); + } + + @Override + public int describeContents() { + return 0; + } + +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/plugins/PluginParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/plugins/PluginParams.aidl new file mode 100644 index 0000000000..beff693f5a --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/plugins/PluginParams.aidl @@ -0,0 +1,5 @@ +// PluginParams.aidl +package net.osmand.aidl.plugins; + +parcelable PluginParams; + diff --git a/OsmAnd-telegram/src/net/osmand/aidl/plugins/PluginParams.java b/OsmAnd-telegram/src/net/osmand/aidl/plugins/PluginParams.java new file mode 100644 index 0000000000..028bd8676a --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/plugins/PluginParams.java @@ -0,0 +1,51 @@ +package net.osmand.aidl.plugins; + +import android.os.Parcel; +import android.os.Parcelable; + +public class PluginParams implements Parcelable { + + private String pluginId; + private int newState; //0- off, 1 - on + + public PluginParams(String pluginId, int newState) { + this.pluginId = pluginId; + this.newState = newState; + } + + public String getPluginId() { + return pluginId; + } + + public int getNewState() { + return newState; + } + + protected PluginParams(Parcel in) { + pluginId = in.readString(); + newState = in.readInt(); + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + dest.writeString(pluginId); + dest.writeInt(newState); + } + + @Override + public int describeContents() { + return 0; + } + + public static final Creator CREATOR = new Creator() { + @Override + public PluginParams createFromParcel(Parcel in) { + return new PluginParams(in); + } + + @Override + public PluginParams[] newArray(int size) { + return new PluginParams[size]; + } + }; +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/search/SearchParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/search/SearchParams.aidl new file mode 100644 index 0000000000..dfda88c493 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/search/SearchParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.search; + +parcelable SearchParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/search/SearchParams.java b/OsmAnd-telegram/src/net/osmand/aidl/search/SearchParams.java new file mode 100644 index 0000000000..303cecb25c --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/search/SearchParams.java @@ -0,0 +1,91 @@ +package net.osmand.aidl.search; + +import android.os.Parcel; +import android.os.Parcelable; + +public class SearchParams implements Parcelable { + + public static final int SEARCH_TYPE_POI = 1; + public static final int SEARCH_TYPE_ADDRESS = 2; + public static final int SEARCH_TYPE_ALL = SEARCH_TYPE_POI | SEARCH_TYPE_ADDRESS; + + private String searchQuery; + private int searchType; + private double latitude; + private double longitude; + private int radiusLevel = 1; + private int totalLimit = -1; + + public SearchParams(String searchQuery, int searchType, double latitude, double longitude, int radiusLevel, int totalLimit) { + this.searchQuery = searchQuery; + this.searchType = searchType; + this.latitude = latitude; + this.longitude = longitude; + this.radiusLevel = radiusLevel; + this.totalLimit = totalLimit; + } + + public SearchParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public SearchParams createFromParcel(Parcel in) { + return new SearchParams(in); + } + + @Override + public SearchParams[] newArray(int size) { + return new SearchParams[size]; + } + }; + + public String getSearchQuery() { + return searchQuery; + } + + public int getSearchType() { + return searchType; + } + + public double getLatitude() { + return latitude; + } + + public double getLongitude() { + return longitude; + } + + public int getRadiusLevel() { + return radiusLevel; + } + + public int getTotalLimit() { + return totalLimit; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeString(searchQuery); + out.writeInt(searchType); + out.writeDouble(latitude); + out.writeDouble(longitude); + out.writeInt(radiusLevel); + out.writeInt(totalLimit); + } + + private void readFromParcel(Parcel in) { + searchQuery = in.readString(); + searchType = in.readInt(); + latitude = in.readDouble(); + longitude = in.readDouble(); + radiusLevel = in.readInt(); + totalLimit = in.readInt(); + } + + @Override + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/search/SearchResult.aidl b/OsmAnd-telegram/src/net/osmand/aidl/search/SearchResult.aidl new file mode 100644 index 0000000000..caecc7721b --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/search/SearchResult.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.search; + +parcelable SearchResult; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/search/SearchResult.java b/OsmAnd-telegram/src/net/osmand/aidl/search/SearchResult.java new file mode 100644 index 0000000000..ef28063355 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/search/SearchResult.java @@ -0,0 +1,96 @@ +package net.osmand.aidl.search; + +import android.os.Parcel; +import android.os.Parcelable; + +import java.util.ArrayList; +import java.util.List; + +public class SearchResult implements Parcelable { + + private double latitude; + private double longitude; + + private String localName; + private String localTypeName; + + private String alternateName; + private List otherNames = new ArrayList<>(); + + + public SearchResult(double latitude, double longitude, String localName, String localTypeName, + String alternateName, List otherNames) { + this.latitude = latitude; + this.longitude = longitude; + this.localName = localName; + this.localTypeName = localTypeName; + this.alternateName = alternateName; + if (otherNames != null) { + this.otherNames = otherNames; + } + } + + public SearchResult(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public SearchResult createFromParcel(Parcel in) { + return new SearchResult(in); + } + + @Override + public SearchResult[] newArray(int size) { + return new SearchResult[size]; + } + }; + + public double getLatitude() { + return latitude; + } + + public double getLongitude() { + return longitude; + } + + public String getLocalName() { + return localName; + } + + public String getLocalTypeName() { + return localTypeName; + } + + public String getAlternateName() { + return alternateName; + } + + public List getOtherNames() { + return otherNames; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeDouble(latitude); + out.writeDouble(longitude); + out.writeString(localName); + out.writeString(localTypeName); + out.writeString(alternateName); + out.writeStringList(otherNames); + } + + private void readFromParcel(Parcel in) { + latitude = in.readDouble(); + longitude = in.readDouble(); + localName = in.readString(); + localTypeName = in.readString(); + alternateName = in.readString(); + in.readStringList(otherNames); + } + + @Override + public int describeContents() { + return 0; + } +} diff --git a/OsmAnd-telegram/src/net/osmand/aidl/tiles/ASqliteDbFile.aidl b/OsmAnd-telegram/src/net/osmand/aidl/tiles/ASqliteDbFile.aidl new file mode 100644 index 0000000000..319cfd5035 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/tiles/ASqliteDbFile.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.tiles; + +parcelable ASqliteDbFile; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/tiles/ASqliteDbFile.java b/OsmAnd-telegram/src/net/osmand/aidl/tiles/ASqliteDbFile.java new file mode 100644 index 0000000000..ac6f5e55d2 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/tiles/ASqliteDbFile.java @@ -0,0 +1,69 @@ +package net.osmand.aidl.tiles; + +import android.os.Parcel; +import android.os.Parcelable; +import android.support.annotation.NonNull; + +public class ASqliteDbFile implements Parcelable { + + private String fileName; + private long modifiedTime; + private long fileSize; + private boolean active; + + public ASqliteDbFile(@NonNull String fileName, long modifiedTime, long fileSize, boolean active) { + this.fileName = fileName; + this.modifiedTime = modifiedTime; + this.fileSize = fileSize; + this.active = active; + } + + public ASqliteDbFile(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new + Creator() { + public ASqliteDbFile createFromParcel(Parcel in) { + return new ASqliteDbFile(in); + } + + public ASqliteDbFile[] newArray(int size) { + return new ASqliteDbFile[size]; + } + }; + + public String getFileName() { + return fileName; + } + + public long getModifiedTime() { + return modifiedTime; + } + + public long getFileSize() { + return fileSize; + } + + public boolean isActive() { + return active; + } + + public void writeToParcel(Parcel out, int flags) { + out.writeString(fileName); + out.writeLong(modifiedTime); + out.writeLong(fileSize); + out.writeByte((byte) (active ? 1 : 0)); + } + + private void readFromParcel(Parcel in) { + fileName = in.readString(); + modifiedTime = in.readLong(); + fileSize = in.readLong(); + active = in.readByte() != 0; + } + + public int describeContents() { + return 0; + } +}