using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Reflection;
using JuSNS.Model;

namespace JuSNS.Factory
{
    public interface IJUser
    {
        IDataReader GetMoodInfo(int UserID);

        DataTable GetMoodIDInfo(int ID);

        DataTable GetBlogIDInfo(int ID);

        DataTable GetDynInfoId(int ID, int flg);

        /// <summary>
        /// 获取通知数量（未读）
        /// </summary>
        /// <param name="UserID"></param>
        /// <returns></returns>
        int NoticeInfo(int UserID);

        /// <summary>
        /// 获取好友请求数量
        /// </summary>
        /// <param name="UserID">被请求的用户ID</param>
        /// <returns></returns>
        int FriendRequest(int UserID, int Type);

        /// <summary>
        /// 新事件提醒
        /// </summary>
        /// <param name="UserID"></param>
        /// <returns></returns>
        int GetNoteNumber(int UserID);

        /// <summary>
        /// 获取日志足迹
        /// </summary>
        /// <param name="UserID">用户名</param>
        /// <param name="Num">调用数量</param>
        /// <returns></returns>        
        IDataReader BlogFootList(int UserID, int Num);

        /// <summary>
        /// 获取用户实体类
        /// </summary>
        /// <param name="UserID">用户ID</param>
        /// <returns></returns>
        UserInfo GetUserInfo(int UserID);

        IDataReader blogFootID(int BlogID, int Num, int UserID);

        /// <summary>
        /// 获得某用户的其他日志
        /// </summary>
        /// <param name="UserID">用户ID</param>
        /// <param name="blogID">当前所在的日志ID</param>
        /// <param name="Num">调用数量</param>
        /// <returns></returns>
        IDataReader BlogMoreID(int UserID, int blogID, int Num);

        int AddPoke(int UserID, int FriendID, int gType, int isPub, string poketo, string pokefrom);

        int ChanagePokeState(int id,int UserID);

        int DelPoke(int ID, int UserID);

        DataTable GetOnlineNumber(int UserID);

        int GetUserCount();

        //bool CheckPrivacyInfo(int UserID, string Type);
    }
    public sealed partial class DataAccess
    {
        public static IJUser CreateJUser()
        {
            string className = path + ".JUser";
            return (IJUser)Assembly.Load(path).CreateInstance(className);
        }
    }
}
