]> git.basschouten.com Git - openhab-addons.git/blob
a18004112c3b1df28e6774d75f0141d1d5f6cb48
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.mybmw.internal.handler.backend;
14
15 import java.util.List;
16
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;
28
29 /**
30  * this is the interface for requesting the myBMW responses
31  * 
32  * @author Martin Grassl - Initial Contribution
33  */
34 @NonNullByDefault
35 public interface MyBMWProxy {
36
37     void setBridgeConfiguration(MyBMWBridgeConfiguration bridgeConfiguration);
38
39     List<@NonNull Vehicle> requestVehicles() throws NetworkException;
40
41     /**
42      * request all vehicles for one specific brand and their state
43      *
44      * @param brand
45      */
46     List<VehicleBase> requestVehiclesBase(String brand) throws NetworkException;
47
48     String requestVehiclesBaseJson(String brand) throws NetworkException;
49
50     /**
51      * request vehicles for all possible brands
52      *
53      * @param callback
54      */
55     List<VehicleBase> requestVehiclesBase() throws NetworkException;
56
57     /**
58      * request the vehicle image
59      *
60      * @param config
61      * @param props
62      * @return
63      */
64     byte[] requestImage(String vin, String brand, ImageProperties props) throws NetworkException;
65
66     /**
67      * request the state for one specific vehicle
68      *
69      * @param baseVehicle
70      * @return
71      */
72     VehicleStateContainer requestVehicleState(String vin, String brand) throws NetworkException;
73
74     String requestVehicleStateJson(String vin, String brand) throws NetworkException;
75
76     /**
77      * request charge statistics for electric vehicles
78      *
79      */
80     ChargingStatisticsContainer requestChargeStatistics(String vin, String brand) throws NetworkException;
81
82     String requestChargeStatisticsJson(String vin, String brand) throws NetworkException;
83
84     /**
85      * request charge sessions for electric vehicles
86      *
87      */
88     ChargingSessionsContainer requestChargeSessions(String vin, String brand) throws NetworkException;
89
90     String requestChargeSessionsJson(String vin, String brand) throws NetworkException;
91
92     ExecutionStatusContainer executeRemoteServiceCall(String vin, String brand, RemoteService service)
93             throws NetworkException;
94
95     ExecutionStatusContainer executeRemoteServiceStatusCall(String brand, String eventId) throws NetworkException;
96 }