Created
August 16, 2018 14:35
-
-
Save tridetch/d889f0f33d7d202529ef97e5e4e80139 to your computer and use it in GitHub Desktop.
MapView
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@StateStrategyType(OneExecutionStateStrategy.class) | |
public interface MapView extends MvpView { | |
@Retention(RetentionPolicy.SOURCE) | |
@IntDef({AlertCode.RENT_FINISH_FAILED, | |
AlertCode.BOOK_FAILED, | |
AlertCode.CAR_NOT_SELECTED, | |
AlertCode.UNEXPECTED_ORDER_STATE, | |
AlertCode.PARK_CAR_SUCCESS, | |
AlertCode.PARK_CAR_FAILED, | |
AlertCode.BEEP_HORN_FAILED, | |
AlertCode.BEEP_HORN_SUCCESS, | |
AlertCode.START_RENT_FAILED, | |
AlertCode.PAY_DEBT_SUCCESS, | |
AlertCode.PAY_DEBT_FAIL, | |
AlertCode.TO_FAVORITE_SUCCESS, | |
AlertCode.TO_FAVORITE_FAIL, | |
AlertCode.REMOVE_FROM_FAVORITE_SUCCESS, | |
AlertCode.REMOVE_FROM_FAVORITE_FAIL, | |
AlertCode.OPEN_BARRIER_SUCCESS, | |
AlertCode.OPEN_BARRIER_FAIL, | |
AlertCode.FINISH_RENT_ON_SUBSCRIPTION | |
}) | |
@interface AlertCode { | |
int RENT_FINISH_FAILED = 0; | |
int BOOK_FAILED = 1; | |
int CAR_NOT_SELECTED = 2; | |
int UNEXPECTED_ORDER_STATE = 3; | |
int START_RENT_FAILED = 4; | |
int PARK_CAR_SUCCESS = 5; | |
int PARK_CAR_FAILED = 6; | |
int BEEP_HORN_FAILED = 7; | |
int BEEP_HORN_SUCCESS = 8; | |
int PAY_DEBT_SUCCESS = 9; | |
int PAY_DEBT_FAIL = 10; | |
int TO_FAVORITE_SUCCESS = 11; | |
int TO_FAVORITE_FAIL = 12; | |
int REMOVE_FROM_FAVORITE_SUCCESS = 13; | |
int REMOVE_FROM_FAVORITE_FAIL = 14; | |
int OPEN_BARRIER_SUCCESS = 15; | |
int OPEN_BARRIER_FAIL = 16; | |
int FINISH_RENT_ON_SUBSCRIPTION = 17; | |
} | |
@Retention(RetentionPolicy.SOURCE) | |
@IntDef({AlertType.DIALOG, | |
AlertType.TOAST}) | |
@interface AlertType { | |
int DIALOG = 0; | |
int TOAST = 1; | |
} | |
@Retention(RetentionPolicy.SOURCE) | |
@IntDef({ConfirmCode.FINISH_RENT, | |
ConfirmCode.BOOK_THE_CAR, | |
ConfirmCode.BOOK_THE_CAR_IN_TRANSFER, | |
ConfirmCode.OPEN_CAR, | |
ConfirmCode.PARK_CAR, | |
ConfirmCode.TRANSFER_CAR, | |
ConfirmCode.CANCEL_TRANSFER}) | |
@interface ConfirmCode { | |
int BOOK_THE_CAR = 0; | |
int BOOK_THE_CAR_IN_TRANSFER = 2; | |
int OPEN_CAR = 3; | |
int PARK_CAR = 4; | |
int FINISH_RENT = 5; | |
int TRANSFER_CAR = 6; | |
int CANCEL_TRANSFER = 7; | |
} | |
@Retention(RetentionPolicy.SOURCE) | |
@IntDef({ControlStateCode.PREVIEW, | |
ControlStateCode.BOOK, | |
ControlStateCode.FREE, | |
ControlStateCode.DRIVE, | |
ControlStateCode.PARK, | |
ControlStateCode.TRANSFER}) | |
@interface ControlStateCode { | |
int PREVIEW = 0; | |
int FREE = 1; | |
int BOOK = 2; | |
int DRIVE = 3; | |
int PARK = 4; | |
int TRANSFER = 5; | |
} | |
void showLoginScreen(); | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void refreshUserData(@NonNull UserData userData); | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void setupBrandingInfo(BrandingInfo brandingInfo); | |
void showNegativeBalanceWarning(); | |
void showPenaltyDialog(); | |
void showRefreshButton(boolean isNeedShow); | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void showNetworkState(boolean isConnected); | |
void hideFreeBookTimer(OrderData orderData); | |
void redrawRateData(CarData car); | |
void showConfirmDialog(@ConfirmCode int confirmMessageCode, @BluetoothControlState int bluetoothState, UserData userData); | |
/** | |
* Update UI according to the state | |
* @param state current state | |
* @param userData all checks of userData must be done before invoke this method | |
* @param isCarSelected | |
*/ | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void refreshControlsToOrderState(@ControlStateCode int state, @Nullable UserData userData, boolean isCarSelected); | |
void showTransferModeUi(@ControlStateCode int state); | |
void redirectToAttachBankCards(); | |
void hideTransferModeUi(); | |
void updateCarFuelInfo(CarData carData); | |
void selectCar(CarData car); | |
void disableNavigationMenu(); | |
void showAdmissionAct(); | |
void showCarConditionDialog(); | |
void showAttachBankCardConfirmation(); | |
void showAttachCardScreen(String paymentPageUri); | |
void attachCardSuccess(); | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void showMapLoading(boolean isLoading); | |
void showTutorial(); | |
void showPersonalAccountPage(String personalAccountUrl); | |
void showTechMenu(boolean isNeedShow); | |
void showFreeBookTimer(@NonNull OrderData orderData); | |
void showOrderCompleteScreen(RentReport rentReport); | |
void showRatePickDialog(boolean onStartRate); | |
void showAlert(@AlertCode int messageCode, @AlertType int alertType); | |
void showAlert(@Nullable String message); | |
void showCheckDocumentsDialog(@Nullable CarData carData, @NonNull String supportPhoneNumber); | |
void showNoCardsAlert(@NonNull String message, String paymentUri); | |
void showMessage(@Nullable String message); | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void showUnreadNewsIcon(Boolean hasUnreadNews); | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void showLoading(boolean isNeedShow); | |
void enableBetaFunctions(boolean isEnabled); | |
void showRefuelingScreen(RefuelingInfo refuelingInfo); | |
void showTaxiButton(boolean isNeedShow); | |
void showFunctionPanel(boolean isNeedShow); | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void showFilterEnabled(boolean isEnabled); | |
/*Methods relate to bluetooth car control feature*/ | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void setBluetoothControlState(@BluetoothControlState int state); | |
void showCarBluetoothError(@BluetoothOperationError int errorCode); | |
void requestBluetoothPermission(); | |
void requestEnableLocation(); | |
void showElectricCarNotice(); | |
void updateCarFavoriteState(boolean isFavorite); | |
void showTransferCompleteDialog(); | |
void showTransferCompleteSummary(TransferCompleteSummary transferCompleteSummary); | |
/* Methods for interacting with map view (Google map etc) */ | |
void showFinishRentWarning(boolean toTransfer); | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void refreshCars(@NonNull List<CarData> cars, OrderData.OrderState orderState); | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void refreshPlaces(@NonNull List<Place> markers); | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void refreshDriveZones(@NonNull List<Zone> zones); | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void refreshRentEndZones(@NonNull List<Zone> zones); | |
void showRoute(@NonNull Route route); | |
void focusArea(@NonNull Coordinates... coordinates); | |
void focusPoint(@NonNull Coordinates coordinates, MapViewWrapper.ZoomLevel zoomLevel); | |
void setMapZoom(MapViewWrapper.ZoomLevel zoomLevel); | |
/**/ | |
void showValidationAlert(@NonNull String qualityControlContacts, long validationPeriod); | |
void showValidationTimer(long minutesLeft); | |
void hideValidationTimer(); | |
void showElectricCarChargingDialog(); | |
void showElectricCarEndInstructionDialog(); | |
void showLowChargeAlert(int chargeLevel, String maskedPhoneNumber); | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void animateToLeft(CarData car); | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void animateToRight(CarData car); | |
@StateStrategyType(value = AddToEndSingleStrategy.class, tag = "near_location") | |
void setNearMyLocation(boolean nearMyLocation); | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void showRadarStartScreen(); | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void showRadarAnimationScreen(); | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void setRadarActive(boolean active); | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void showMarkers(List<PlaceMarker> markers, String baseUrl); | |
void showHelpMenuDialog(); | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void showMarkerInfo(@NotNull PlaceMarker placeMarker, String distance, String baseUrl); | |
@StateStrategyType(value = AddToEndSingleStrategy.class, tag = "triggeredDistance") | |
void triggeredDistance(); | |
@StateStrategyType(value = AddToEndSingleStrategy.class, tag = "abonTimer") | |
void updateAbonentTime(long value); | |
@StateStrategyType(AddToEndSingleStrategy.class) | |
void showDefectsScreen(String carId); | |
void showOpenBarrierButton(boolean showButton); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment