using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using Aitex.Core.Util;
namespace Aitex.Core.Account
{
///
/// This interface defines operation contracts for user account management.
///
[ServiceContract]
public interface IAccountService
{
///
/// User calls this method to login the server.
///
///
///
[OperationContract]
LoginResult Login(string accountId, string password);
///
/// User calls this method to logout from the server.
///
///
[OperationContract]
void Logout(string accountId);
///
/// Administrator user calls this method to create a new account.
///
///
///
[OperationContract]
CreateAccountResult CreateAccount(Account newAccount);
///
/// Administrator user calls this method to delete an account.
///
///
///
[OperationContract]
DeleteAccountResult DeleteAccount(string accountId);
///
/// get current login user's account data
///
///
//[OperationContract]
//Account GetCurrentUser();
///
/// get user data by accountId
///
///
///
[OperationContract]
GetAccountInfoResult GetAccountInfo(string accountId);
///
/// update account
///
///
/// 6
[OperationContract]
UpdateAccountResult UpdateAccount(Account account);
///
/// get account list
///
///
[OperationContract]
GetAccountListResult GetAccountList();
///
/// change account password
///
///
///
[OperationContract]
ChangePwdResult ChangePassword(string accountId, string newPassword);
///
/// 获取当前登录的用户
///
///
[OperationContract]
List GetLoginUsers();
///
/// 强制注销用户
///
///
///
[OperationContract]
void KickUserOut(string accountId, string reason);
///
/// get all roles' permission
///
///
///
[OperationContract]
SerializableDictionary> GetAllRolesPermission();
///
/// save all roles' permission
///
///
///
[OperationContract]
bool SaveAllRolesPermission(Dictionary> data);
///
/// get all view list
///
///
///
[OperationContract]
SerializableDictionary GetAllViewList();
///
/// Get all roles
///
///
[OperationContract]
IEnumerable GetAllRoles();
///
/// UI 界面定期发送CheckAlive事件,用于通知AccountManager当前用户仍旧Alive
/// 如果连续超过10秒钟没有发送Alive信息,系统自动将该用户注销
///
///
//[OperationContract]
void CheckAlive(string accountId);
/*
[OperationContract]
void RequestAuthorization(string accountId, string ip);
[OperationContract]
void AbortAuthorization();
[OperationContract]
void GrantAuthorization(bool isGranted);
[OperationContract]
List LoadInterestedEvents(string accountEmail);
[OperationContract]
void SaveInterestedEvents(string accountEmail, List events);
[OperationContract]
int GetMaxInterestedEvents();
[OperationContract]
void SaveWarningEvents(List warningEvents);
[OperationContract]
List LoadWarningEvents();
*/
[OperationContract]
string GetProcessViewPermission();
[OperationContract]
bool SaveProcessViewPermission(string viewXML);
}
}