//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using System.Collections;
using System.Data;
using CommunityServer.Components;

namespace CommunityServer.Reader.Components
{
	/// <summary>
	/// Summary description for ReaderApplication.
	/// </summary>
	public class ReaderApplication : EmptyCSApplicationData
	{
		public ReaderApplication()
		{
		}

	    public override ApplicationType ApplicationType
	    {
	        get { return ApplicationType.FeedReader; }
	    }

	    public override string Name
	    {
	        get { return ResourceManager.GetString("reader"); }
	    }

	    public override bool Enabled
	    {
	        get { return ReaderConfiguration.Instance().Enabled; }
	    }

	    public override void SetEnabledStatus(bool enabled)
	    {
	        ReaderConfiguration config = ReaderConfiguration.Instance(false);
            config.Enabled = enabled;
            config.Save();
	    }

		public override bool SupportsTags
		{
			get { return false; }
		}
	}

    public class RollerApplication : EmptyCSApplicationData
    {
        public override ApplicationType ApplicationType
        {
            get { return ApplicationType.BlogRoller; }
        }

        public override string Name
        {
            get { return ResourceManager.GetString("roller"); }
        }

        public override bool Enabled
        {
            get { return ReaderConfiguration.Instance().RollerEnabled; }
        }

        public override void SetEnabledStatus(bool enabled)
        {
            ReaderConfiguration config = ReaderConfiguration.Instance(false);
            config.RollerEnabled = enabled;
            config.Save();
        }

		public override bool SupportsTags
		{
			get { return false; }
		}
    }
}
