using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Win32;

namespace EA.GameTalkRouter
{
	public abstract class ConfigReader
	{
		protected volatile GameTalkMessages.LoggingLevel mLoggingLevel = GameTalkMessages.LoggingLevel.FULL_LOGGING;
		// We shouldn't need to lock access to mLoggingLevel since it is marked as volatile
		public GameTalkMessages.LoggingLevel LogLevel
		{
			get { return mLoggingLevel; }
		}

		protected volatile bool mLimitLogFileSize = true;
		public bool LimitLogFileSize
		{
			get { return mLimitLogFileSize; }
		}

		protected volatile bool mCreateFileForMonitorToDelete = false;
		/// <summary>
		/// If the following is true - we can't rely on a co-operating process like 
		/// the GameTalkMonitor/GameTalkViewer to exist - so we handle file switches on our own
		/// </summary>
		public bool CreateFileForMonitorToDelete
		{
			get { return mCreateFileForMonitorToDelete; }
		}

		protected static volatile ConfigReader sConfigReader;
		public static ConfigReader Instance
		{
			get
			{
				return sConfigReader;
			}
			set
			{
				sConfigReader = value;
			}
		}
	}
}
