2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.mybmw.internal.handler.backend;
15 import java.util.List;
17 import org.eclipse.jdt.annotation.NonNull;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.openhab.binding.mybmw.internal.MyBMWBridgeConfiguration;
20 import org.openhab.binding.mybmw.internal.dto.charge.ChargingSessionsContainer;
21 import org.openhab.binding.mybmw.internal.dto.charge.ChargingStatisticsContainer;
22 import org.openhab.binding.mybmw.internal.dto.remote.ExecutionStatusContainer;
23 import org.openhab.binding.mybmw.internal.dto.vehicle.Vehicle;
24 import org.openhab.binding.mybmw.internal.dto.vehicle.VehicleBase;
25 import org.openhab.binding.mybmw.internal.dto.vehicle.VehicleStateContainer;
26 import org.openhab.binding.mybmw.internal.handler.enums.RemoteService;
27 import org.openhab.binding.mybmw.internal.utils.ImageProperties;
30 * this is the interface for requesting the myBMW responses
32 * @author Martin Grassl - Initial Contribution
35 public interface MyBMWProxy {
37 void setBridgeConfiguration(MyBMWBridgeConfiguration bridgeConfiguration);
39 List<@NonNull Vehicle> requestVehicles() throws NetworkException;
42 * request all vehicles for one specific brand and their state
46 List<VehicleBase> requestVehiclesBase(String brand) throws NetworkException;
48 String requestVehiclesBaseJson(String brand) throws NetworkException;
51 * request vehicles for all possible brands
55 List<VehicleBase> requestVehiclesBase() throws NetworkException;
58 * request the vehicle image
64 byte[] requestImage(String vin, String brand, ImageProperties props) throws NetworkException;
67 * request the state for one specific vehicle
72 VehicleStateContainer requestVehicleState(String vin, String brand) throws NetworkException;
74 String requestVehicleStateJson(String vin, String brand) throws NetworkException;
77 * request charge statistics for electric vehicles
80 ChargingStatisticsContainer requestChargeStatistics(String vin, String brand) throws NetworkException;
82 String requestChargeStatisticsJson(String vin, String brand) throws NetworkException;
85 * request charge sessions for electric vehicles
88 ChargingSessionsContainer requestChargeSessions(String vin, String brand) throws NetworkException;
90 String requestChargeSessionsJson(String vin, String brand) throws NetworkException;
92 ExecutionStatusContainer executeRemoteServiceCall(String vin, String brand, RemoteService service)
93 throws NetworkException;
95 ExecutionStatusContainer executeRemoteServiceStatusCall(String brand, String eventId) throws NetworkException;