//----------------------------------------------------------------------- // // Copyright © 2012 Nils Hammar. All rights reserved. // //----------------------------------------------------------------------- /* * Software to access vehicle information via the OBD-II connector. * * Copyright © 2012 Nils Hammar * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Alternative licensing is possible, see the licensing document. * * The above text may not be removed or modified. */ namespace SharedObjects.DataMgmt { using System.Collections.Generic; /// /// Methods for getting and setting preferences for the application. /// public interface IPreferences { /// /// Gets refresh interval alternatives. /// IList refreshIntervals { get; } /// /// Gets The currently selected unit category. (0=General, 1=Metric, 2=Imperial.) /// /// Notice that "General" means that data will be presented in both metric and imperial. /// /// int selectedUnitCategory { get; } /// /// Gets default timeout value. /// int defaultTimeout { get; } /// /// Gets threshold for when a secondary Y axis shall be used in charts. /// int secondaryYThreshold { get; } /// /// Gets default timeout value. /// string obdCodeDatabase { get; } /// /// Gets Name of GPS port. /// string gpsSerialPortName { get; } /// /// Gets a value indicating whether features useful for development shall be available. /// /// Notice that some of the features may be dangerous. /// /// bool developerMode { get; } /// /// Gets Time in milliseconds to pause after sending a message. /// int sendDelay { get; } /// /// Gets Number of blocks accepted from peer before sending CTS. /// byte blockSize { get; } /// /// Gets Time in milliseconds to request that peer spaces it's frames with. /// byte frameSpacing { get; } /// /// Get a preference as an integer value. /// Returns zero if the data was invalid. /// /// Name of preference. /// Preference as an integer value. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "int", Justification = "Suitable in this case.")] int getIntPreference(string preferenceName); /// /// Get a preference as a string value. /// Notice: May return 'null'. /// /// Name of preference. /// Preference as a string value. string getPreference(string preferenceName); /// /// Store a preference with the given name and value. /// /// Name of preference. /// Preference value. void setPreference(string preferenceName, string value); } }