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

using System;

namespace CommunityServer.Components {

    public enum DefaultRoles {
        Everyone = 0,
        GlobalAdministrators = 1,
        ForumAdministrators = 2,
        GlobalModerators = 3,
        ForumModerators = 4
    }

    public enum DefaultForums {
        Reporting = 1,
        DeletedPosts = 2
    }
    
    [Flags()]
    public enum Permission : long {
		Undefined		= 0,
		View			= 0x0000000000000001,
		Read			= 0x0000000000000002,
		Post			= 0x0000000000000004,
		Reply			= 0x0000000000000008,
		Edit			= 0x0000000000000010,
		Delete			= 0x0000000000000020,
		LocalAttachment	= 0x0000000000000040,
		Vote			= 0x0000000000000080,
		MarkAsAnswer	= 0x0000000000000100,
		RemoteAttachment= 0x0000000000000200,
		Video			= 0x0000000000000400,
		Ink				= 0x0000000000000800,
		CreatePoll		= 0x0000000100000000,
		Sticky			= 0x0000000200000000,
		Announcement	= 0x0000000400000000,
		EditOthers		= 0x0000000800000000,
		Moderate		= 0x0000100000000000,
		Administer		= 0x0100000000000000,
		SystemAdmin		= 0x4000000000000000,
	}

    public enum AccessControlEntry {
        NotSet  = 0x00,
        Allow   = 0x01,
        Deny    = 0x02
    }

    public enum LoginUserStatus {
        /// <summary>
        /// Username and password didn't match.
        /// </summary>
        InvalidCredentials = 0, 

        /// <summary>
        /// The user name and password are ok.
        /// </summary>
        Success = 1, 

        AccountPending = 2,

        AccountBanned = 3,

        AccountDisapproved = 4,

        /// <summary>
        /// Unknown situation possibly generated by un-syncronization beteen 
        /// data layer and business layer.
        /// </summary>
        UnknownError = 100
    }

    /// <summary>
    /// Indicates the return status for logging-in a new user.
    /// </summary>
    public enum UserAccountStatus { 

        ApprovalPending = 0,
        Approved = 1,
        Banned = 2,
        Disapproved = 3,
		All = 9999
    }
    
    public enum PasswordRecovery {
       
        SecureLink = 1,
        Reset = 2,
        QuestionAndAnswer = 3
    }

    /// <summary>
    /// User banning time in days.
    /// </summary>
    public enum UserBanPeriod {
      Permanent = 55500, // ~ 150 years
      OneDay = 1,
      ThreeDays = 3,
      FiveDays = 5,
      OneWeek = 7,
      TwoWeeks = 14,
      OneMonth = 30
    }

    public enum UserBanReason { 
        Profanity,
        Advertising,
        Spam,
        Aggresive,
        BadUsername,
        BadSignature,
        BanDodging,
        Other
    }
}
