mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-05 10:36:30 +01:00
135 lines
4.3 KiB
C#
135 lines
4.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Threading;
|
|
using Serilog.Events;
|
|
using TINK.Model.Connector;
|
|
using TINK.Model.Device;
|
|
using TINK.Model.Services.CopriApi.ServerUris;
|
|
using TINK.Model.Settings;
|
|
using TINK.Model.Station;
|
|
using TINK.Services;
|
|
using TINK.Services.BluetoothLock;
|
|
using TINK.Settings;
|
|
using TINK.ViewModel.Map;
|
|
using TINK.ViewModel.Settings;
|
|
|
|
namespace TINK.Model
|
|
{
|
|
public enum AppFlavor
|
|
{
|
|
[Display(Name = "sharee.bike")]
|
|
ShareeBike,
|
|
[Display(Name = "Lastenrad Bayern")]
|
|
LastenradBayern,
|
|
[Display(Name = "Mein konrad")]
|
|
MeinKonrad,
|
|
}
|
|
|
|
public interface ITinkApp
|
|
{
|
|
/// <summary> Update connector from depending on whether user is logged in or not.</summary>
|
|
void UpdateConnector();
|
|
|
|
/// <summary> Saves object to file. </summary>
|
|
void Save();
|
|
|
|
/// <summary> Holds the filter which is applied on the map view. Either TINK or Konrad stations are displayed. </summary>
|
|
IGroupFilterMapPage GroupFilterMapPage { get; set; }
|
|
|
|
/// <summary> Holds the user of the app. </summary>
|
|
User.User ActiveUser { get; }
|
|
|
|
/// <summary> Holds the system to copri.</summary>
|
|
IFilteredConnector GetConnector(bool isConnected);
|
|
|
|
/// <summary> Name of the station which is selected. </summary>
|
|
IStation SelectedStation { get; set; }
|
|
|
|
/// <summary>Polling periode.</summary>
|
|
PollingParameters Polling { get; set; }
|
|
|
|
TimeSpan ExpiresAfter { get; set; }
|
|
|
|
/// <summary> Holds status about whants new page. </summary>
|
|
WhatsNew WhatsNew { get; }
|
|
|
|
/// <summary> Gets whether device is connected to internet or not. </summary>
|
|
bool GetIsConnected();
|
|
|
|
/// <summary> Action to post to GUI thread.</summary>
|
|
Action<SendOrPostCallback, object> PostAction { get; }
|
|
|
|
/// <summary> Holds the uri which is applied after restart. </summary>
|
|
Uri NextActiveUri { get; set; }
|
|
|
|
/// <summary> Holds the filters loaded from settings. </summary>
|
|
IGroupFilterSettings FilterGroupSetting { get; set; }
|
|
|
|
/// <summary>Settings determining the startup behavior of the app.</summary>
|
|
IStartupSettings StartupSettings { get; }
|
|
|
|
/// <summary> Value indicating whether map is centerted to current position or not. </summary>
|
|
bool CenterMapToCurrentLocation { get; set; }
|
|
|
|
/// <summary> Holds the map area where user is or was located or null if position is unknown. </summary>
|
|
Xamarin.Forms.GoogleMaps.MapSpan UserMapSpan { get; set; }
|
|
|
|
/// <summary> Holds the map span to display either default span or span centered to current position depending on option <see cref="CenterMapToCurrentLocation"/>.</summary>
|
|
Xamarin.Forms.GoogleMaps.MapSpan ActiveMapSpan { get; }
|
|
|
|
bool LogToExternalFolder { get; set; }
|
|
|
|
bool IsSiteCachingOn { get; set; }
|
|
|
|
/// <summary> Gets the minimum logging level. </summary>
|
|
LogEventLevel MinimumLogEventLevel { get; set; }
|
|
|
|
/// <summary> Gets a value indicating whether reporting level is verbose or not.</summary>
|
|
bool IsReportLevelVerbose { get; set; }
|
|
|
|
/// <summary> Updates logging level. </summary>
|
|
/// <param name="newLogLevel">New level to set.</param>
|
|
void UpdateLoggingLevel(LogEventLevel newLogLevel);
|
|
|
|
/// <summary>Holds uris of copri servers. </summary>
|
|
CopriServerUriList Uris { get; }
|
|
|
|
/// <summary> Holds the different lock service implementations.</summary>
|
|
LocksServicesContainerMutable LocksServices { get; }
|
|
|
|
/// <summary> Holds the flavor of the app, i.e. specifies if app is sharee.bike, Mein konrad or Lastenrad Bayern.</summary>
|
|
AppFlavor Flavor { get; }
|
|
|
|
/// <summary> Holds available app themes.</summary>
|
|
ServicesContainerMutable Themes { get; }
|
|
|
|
/// <summary> Reference of object which provides device information. </summary>
|
|
ISmartDevice SmartDevice { get; }
|
|
|
|
/// <summary> Holds the folder where settings files are stored. </summary>
|
|
string SettingsFileFolder { get; }
|
|
|
|
/// <summary> Holds the external path. </summary>
|
|
string ExternalFolder { get; }
|
|
|
|
/// <summary> Holds the stations availalbe. </summary>
|
|
IEnumerable<IStation> Stations { get; set; }
|
|
|
|
/// <summary> Holds the Urs to query resources from. </summary>
|
|
IResourceUrls ResourceUrls { get; set; }
|
|
}
|
|
|
|
public interface IResourceUrls
|
|
{
|
|
string FeesResourcePath { get; }
|
|
|
|
string BikesResourcePath { get; }
|
|
|
|
string AgbResourcePath { get; }
|
|
|
|
string PrivacyResourcePath { get; }
|
|
|
|
string ImpressResourcePath { get; }
|
|
}
|
|
}
|