接口设计方案 一、设计方案 由甲方调用监控模块,控制监控模块的启停、设置策略等,通过甲方调用监控模块DLL的接口将监控策略告知监控模块,由监控模块监控相关操作行为,并根据策略配置调用甲方提供的文件内容检查模块,对相关文件进行文件内容筛查,来确定文件是否是涉密文件。同时通过甲方程序调用乙方监控模块DLL接口获取监控结果。 甲方文件内容检查模块 甲方文件内容检查模块 甲方程序监控监控模块DLL 甲方 程序 监控 监控模块DLL 一、接口部分(监控模块DLL,乙方提供) ************************************ Function:Init Description:初始化操作 Input:无 Output:无 Return:true:成功,false:失败 Other: *********************************** 1、bool Init(); ************************************ Function:SetRule Description:设置监控规则 接口设计方案全文共7页,当前为第1页。Input:char* pRule:监控规则,XML格式,见附1 接口设计方案全文共7页,当前为第1页。 Output:无 Return:true:成功,false:失败 Other: *********************************** 2、bool SetRule(char* pRule); ************************************ Function:Start Description:设置完规则,启动监控规则生效 Input:无 Output:无 Return:true:成功,false:失败 Other: *********************************** 3、bool Start(); ************************************ Function:WaitData Description:实时等待获取监控数据可以是一条可以是多条。返回监控结果见附2 Input:无 Output: int &nCount返回总条数,char**&pData返回数据。 Return:-1.异常0.成功获取数据1.结束 / 停止(其他地方调用Stop接口停止) Other:建议乙方内部实现用信号、内核事件等处理方式。 *********************************** 4、int WaitData(int &nCount, char**& pData); 甲方调用伪代码: ThreadFunc() //实时线程 { While(TRUE) { char** pData = NULL; int nCount = 0; int nRet = WaitData(nCount,pData); //等待一条或多条数据时返回,没有数据就等待。 switch(nRet) { -1.异常continue; 0.成功获取数据 pData[0]、pData[1]、…… 1.结束 / 停止(其他地方调用Stop停止) Return; } FreeData(pData); 接口设计方案全文共7页,当前为第2页。} 接口设计方案全文共7页,当前为第2页。 } ************************************ Function:FreeData Description:释放数据内存接口,对应WaitData函数 Input:int nCount 要释放的元素数量,char**要释放的数据 Output:无 Return:无 Other: *********************************** 5、FreeData (int nCount ,char** pData); ************************************ Function:Stop Description:停止监控,监控规则失效 Input:无 Output:无 Return:true:成功,false:失败 Other: *********************************** 6、bool Stop(); ************************************ Function:UnInit Description:程序退出 Input:无 Output:无 Return:true:成功,false:失败 Other: *********************************** 7、UnInit();
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/release/download_crawler_static/87345849/bg1.jpg)
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/5aae13958c82419c9c42cd3306ea6ab6_qq_43934844.jpg!1)
- 粉丝: 180
- 资源: 3万+
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)