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.Stations.StationNS; 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 { /// Update connector from depending on whether user is logged in or not. void UpdateConnector(); /// Saves object to file. void Save(); /// Holds the filter which is applied on the map view. Either TINK or Konrad stations are displayed. IGroupFilterMapPage GroupFilterMapPage { get; set; } /// Holds the user of the app. User.User ActiveUser { get; } /// Holds the system to copri. IFilteredConnector GetConnector(bool isConnected); /// Name of the station which is selected. IStation SelectedStation { get; set; } /// Polling period. PollingParameters Polling { get; set; } TimeSpan ExpiresAfter { get; set; } /// Holds status about whats new page. WhatsNew WhatsNew { get; } /// Gets whether device is connected to Internet or not. bool GetIsConnected(); /// Action to post to GUI thread. Action PostAction { get; } /// Holds the uri which is applied after restart. Uri NextActiveUri { get; set; } /// Holds the filters loaded from settings. IGroupFilterSettings FilterGroupSetting { get; set; } /// Settings determining the startup behavior of the app. IStartupSettings StartupSettings { get; } /// Value indicating whether map is centered to current position or not. bool CenterMapToCurrentLocation { get; set; } /// Holds the map area where user is or was located or null if position is unknown. Xamarin.Forms.GoogleMaps.MapSpan UserMapSpan { get; set; } /// Holds the map span to display either default span or span centered to current position depending on option . Xamarin.Forms.GoogleMaps.MapSpan ActiveMapSpan { get; } bool LogToExternalFolder { get; set; } bool IsSiteCachingOn { get; set; } /// Gets the minimum logging level. LogEventLevel MinimumLogEventLevel { get; set; } /// Gets a value indicating whether reporting level is verbose or not. bool IsReportLevelVerbose { get; set; } /// Updates logging level. /// New level to set. void UpdateLoggingLevel(LogEventLevel newLogLevel); /// Holds uris of copri servers. CopriServerUriList Uris { get; } /// Holds the different lock service implementations. LocksServicesContainerMutable LocksServices { get; } /// Holds the flavor of the app, i.e. specifies if app is sharee.bike, Mein konrad or LastenRad Bayern. AppFlavor Flavor { get; } /// Holds available app themes. ServicesContainerMutable Themes { get; } /// Reference of object which provides device information. ISmartDevice SmartDevice { get; } /// Holds the folder where settings files are stored. string SettingsFileFolder { get; } /// Holds the external path. string ExternalFolder { get; } /// Holds the stations centered. IEnumerable Stations { get; set; } /// Holds the Urs to query resources from. IResourceUrls ResourceUrls { get; set; } } public interface IResourceUrls { string FeesResourcePath { get; } string BikesResourcePath { get; } string AgbResourcePath { get; } string PrivacyResourcePath { get; } string ImpressResourcePath { get; } } }