📄 registrar.h
字号:
/* * (c) Copyright 2008 Philipp Skadorov (philipp_s@users.sourceforge.net) * * This file is part of FREESECS. * * FREESECS is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * FREESECS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with FREESECS, see COPYING. * If not, see <http://www.gnu.org/licenses/>. */#ifndef _REGISTRAR_H#define _REGISTRAR_H#include <vector>#include "shared_ptr.h"#include "hsmsd_interface.h"#include "async_reception.h"#include "shared_ptr.h"namespace freesecs{ /** * \brief Receives hsmsd_register_req_t from /var/run/hsmsd/hsmsd, * Checks hsms_factory_t for the connection instance and creates user agent * to process requests for the client. * \see hsmsd_register_req_t * \see hsmsd_register_rsp_t * \see hsms_factory_t * \see user_agent_t */ class user_agent_t; class hsmsd_client_registrar_t { public: hsmsd_client_registrar_t(); ~hsmsd_client_registrar_t(); void process(); public: int data_rcvd_handler(const size_t&); int rcv_error_handler(const int&); private: void process_user_request(); private: int _fd_in; int _fd_out; shared_ptr_t<async_reception_t> _ar; hsmsd_register_req_t register_req; private: typedef shared_ptr_t<user_agent_t> pclient_t; std::vector<pclient_t> _clients; };}//namespace#endif /*_REGISTRAR_H*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -