2021-06-26 20:57:55 +02:00
using Serilog.Events ;
2021-05-13 20:03:07 +02:00
using System ;
using System.Threading ;
using TINK.Model.Connector ;
using TINK.Model.Device ;
using TINK.Services.BluetoothLock ;
using TINK.Model.Services.CopriApi.ServerUris ;
using TINK.Settings ;
using TINK.ViewModel.Map ;
using TINK.ViewModel.Settings ;
using TINK.Services ;
2021-06-26 20:57:55 +02:00
using TINK.Model.Station ;
using System.Collections.Generic ;
2021-05-13 20:03:07 +02:00
namespace TINK.Model
{
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>Sets flag whats new page was already shown to true. </summary>
void SetWhatsNewWasShown ( ) ;
/// <summary> Holds the system to copri.</summary>
IFilteredConnector GetConnector ( bool isConnected ) ;
/// <summary> Name of the station which is selected. </summary>
2021-06-26 20:57:55 +02:00
IStation SelectedStation { get ; set ; }
2021-05-13 20:03:07 +02:00
/// <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> Value indicating whether map is centerted to current position or not. </summary>
bool CenterMapToCurrentLocation { get ; set ; }
2021-12-08 20:03:50 +01:00
/// <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 ; }
2021-11-14 23:27:29 +01:00
2021-05-13 20:03:07 +02:00
bool LogToExternalFolder { get ; set ; }
bool IsSiteCachingOn { get ; set ; }
/// <summary> Gets the minimum logging level. </summary>
LogEventLevel MinimumLogEventLevel { get ; set ; }
2021-06-26 20:57:55 +02:00
/// <summary> Gets a value indicating whether reporting level is verbose or not.</summary>
bool IsReportLevelVerbose { get ; set ; }
2021-05-13 20:03:07 +02:00
/// <summary> Updates logging level. </summary>
/// <param name="p_oNewLevel">New level to set.</param>
void UpdateLoggingLevel ( LogEventLevel p_oNewLevel ) ;
/// <summary>Holds uris of copri servers. </summary>
CopriServerUriList Uris { get ; }
/// <summary> Holds the different lock service implementations.</summary>
LocksServicesContainerMutable LocksServices { get ; }
/// <summary> Holds available app themes.</summary>
ServicesContainerMutable < object > Themes { get ; }
/// <summary> Reference of object which provides device information. </summary>
2021-06-26 20:57:55 +02:00
ISmartDevice SmartDevice { get ; }
2021-05-13 20:03:07 +02:00
/// <summary> Holds the folder where settings files are stored. </summary>
string SettingsFileFolder { get ; }
/// <summary> Holds the external path. </summary>
string ExternalFolder { get ; }
2021-06-26 20:57:55 +02:00
/// <summary> Holds the stations availalbe. </summary>
2022-01-22 18:28:01 +01:00
IEnumerable < IStation > Stations { get ; set ; }
IResourceUrls ResourceUrls { get ; set ; }
2021-05-13 20:03:07 +02:00
}
2022-01-22 18:28:01 +01:00
public interface IResourceUrls
{
string FeesResourcePath { get ; }
string BikesResourcePath { get ; }
string AgbResourcePath { get ; }
string PrivacyResourcePath { get ; }
string ImpressResourcePath { get ; }
}
2021-05-13 20:03:07 +02:00
}