⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 imessage.java

📁 用java实现的
💻 JAVA
字号:
/*
* LumaQQ - Java QQ Client
*
* Copyright (C) 2004 luma <stubma@163.com>
*
* This program 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 2 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package edu.tsinghua.lumaqq;

import java.util.List;

/**
 * <pre>
 * 聊天记录的操作定义接口,为了增加灵活性,以便于在以后能和
 * QQ的记录文件接口,所以定义一个接口
 * </pre>
 * 
 * @author 马若劼
 */
public interface IMessage {
	/**
	 * 保存一条消息
	 * @param owner 消息从属,比如不管是系统通知还是群通知,我们都认为他是系统消息,从属于10000
	 * @param src 好友的QQ号,或者群的内部ID,这个是第二级的从属关系,比如说群
	 * @param sender 发送者QQ号,这个可以说是第三级的从属关系,是直接导致这个消息产生的用户
	 * @param message 消息正文
	 * @param time 消息的实际发送时间的毫秒数除以1000
	 */
	public void saveMessage(int owner, int src, int sender, String message, int time);
	
	/**
	 * 得到某天的所有消息
	 * @param qqNum QQ号
	 * @param year 年
	 * @param month 月
	 * @param day 日
	 * @return 包含了MessageEntry类型的列表
	 */
	public List getMessages(int qqNum, int year, int month, int day);
	
	/**
	 * 得到某好友的所有消息
	 * @param qqNum
	 * @return
	 */
	public List getMessages(int qqNum);
	
	/**
	 * 根据关键字搜索所有的消息
	 * @param qqNum QQ号
	 * @param keyword 关键字
	 * @return 包含了MessageEntry类型的列表
	 */
	public List searchMessages(int qqNum, String keyword);
	
	/**
	 * 在指定的时间区间内搜索消息
	 * @param qqNum QQ号
	 * @param keyword 关键字
	 * @param fromYear 开始的年
	 * @param fromMonth 开始月
	 * @param fromDay 开始日
	 * @param toYear 结束年
	 * @param toMonth 结束月
	 * @param toDay 结束日
	 * @return 包含了MessageEntry类型的列表
	 */
	public List searchMessages(int qqNum, String keyword, int fromYear, int fromMonth, int fromDay, int toYear, int toMonth, int toDay);

	/**
	 * 关闭文件,释放资源
	 */
	public void close();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -