You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
1.3 KiB
76 lines
1.3 KiB
/* |
|
* @Description: |
|
* @Version: 1.0 |
|
* @Autor: lishengyin |
|
* @Date: 2022-04-12 08:37:45 |
|
* @LastEditors: lishengyin |
|
* @LastEditTime: 2022-04-12 10:16:08 |
|
*/ |
|
#ifndef __DISPOSITION_HPP_ |
|
#define __DISPOSITION_HPP_ |
|
|
|
#include <iostream> |
|
#include "NonCopyable.hpp" |
|
#include <map> |
|
#include "login.hpp" |
|
|
|
#include "Util/logger.h" |
|
#include "Util/NoticeCenter.h" |
|
#include "Poller/EventPoller.h" |
|
#include "Util/SqlPool.h" |
|
#include "Network/TcpClient.h" |
|
#include "Poller/Timer.h" |
|
#include <vector> |
|
|
|
using namespace std; |
|
using namespace toolkit; |
|
|
|
|
|
class Disposition:private NonCopyable |
|
{ |
|
private: |
|
Disposition(){} |
|
|
|
public: |
|
using Ptr = std::shared_ptr<Disposition>; |
|
|
|
~Disposition(){} |
|
|
|
/** |
|
* @description: 获取ptr |
|
* @param {*} |
|
* @return {*} |
|
*/ |
|
static std::shared_ptr<Disposition> getPtr(); |
|
|
|
/** |
|
* @description: 初始化 |
|
* @param {*} |
|
* @return {*} |
|
*/ |
|
bool Init(); |
|
|
|
/** |
|
* @description: 获取用户合法 |
|
* @param {*} |
|
* @return {*} |
|
*/ |
|
bool getUserValidity(Login& login); |
|
|
|
/** |
|
* @description: 获取用户数据 |
|
* @param {*} |
|
* @return {*} |
|
*/ |
|
bool getUserInfos(); |
|
|
|
protected: |
|
std::string mysqlIP = "101.35.200.152"; |
|
int port = 13306; |
|
map<std::string, std::string> LoginInfos; |
|
}; |
|
|
|
|
|
|
|
|
|
#endif |