// Path: app/src/main/java/com/wyp/materialqqlite/qqclient/msglog/SessMsgLog.java
// public class SessMsgLog {	// 临时会话(群成员)消息记录
// 	public int m_nID;
// 	public int m_nQQNum;
// 	public String m_strNickName;
// 	public int m_nTime;
// 	public boolean m_bSendFlag;
// 	public String m_strContent;
// }
// 
// Path: app/src/main/java/com/wyp/materialqqlite/qqclient/protocol/protocoldata/Content.java
// public class Content {
// 	public ContentType m_nType;			// 内容类型
// 	public FontInfo m_FontInfo;			// 字体信息
// 	public String m_strText;			// 文本信息
// 	public int m_nFaceId;				// 系统表情Id
// 	public CustomFaceInfo m_CFaceInfo;	// 自定义表情信息
// 	
// 	public Content() {
// 		m_nType = ContentType.CONTENT_TYPE_UNKNOWN;
// 		m_FontInfo = new FontInfo();
// 		m_CFaceInfo = new CustomFaceInfo();
// 	}
// }
// 
// Path: app/src/main/java/com/wyp/materialqqlite/qqclient/protocol/protocoldata/ContentType.java
// public enum ContentType {
// 	CONTENT_TYPE_UNKNOWN,
// 	CONTENT_TYPE_FONT_INFO,
// 	CONTENT_TYPE_TEXT,
// 	CONTENT_TYPE_FACE,
// 	CONTENT_TYPE_CUSTOM_FACE,
// 	CONTENT_TYPE_OFF_PIC
// }


import java.io.File;
import java.util.ArrayList;
import java.util.List;
import com.wyp.materialqqlite.Utils;
import com.wyp.materialqqlite.qqclient.msglog.BuddyMsgLog;
import com.wyp.materialqqlite.qqclient.msglog.GroupMsgLog;
import com.wyp.materialqqlite.qqclient.msglog.SessMsgLog;
import com.wyp.materialqqlite.qqclient.protocol.protocoldata.BuddyMessage;
import com.wyp.materialqqlite.qqclient.protocol.protocoldata.Content;
import com.wyp.materialqqlite.qqclient.protocol.protocoldata.ContentType;
import com.wyp.materialqqlite.qqclient.protocol.protocoldata.GroupMessage;
import com.wyp.materialqqlite.qqclient.protocol.protocoldata.SessMessage;
	
	// "/f["系统表情id"] /c["自定义表情文件名"] /o["字体名称，大小，颜色，加粗，倾斜，下划线"]"
	public static String formatContent(ArrayList<Content> arrContent) {
		String strMsg = "";

		for (int i = 0; i < arrContent.size(); i++) {
			Content content = arrContent.get(i);
			if (null == content)
				continue;

			if (ContentType.CONTENT_TYPE_FONT_INFO == content.m_nType) {
					String strColor = Utils.RGBToHexStr(content.m_FontInfo.m_clrText);

					strMsg += "/o[\"";
					strMsg += content.m_FontInfo.m_strName;
					strMsg += ",";
					strMsg += content.m_FontInfo.m_nSize;
					strMsg += ",";
					strMsg += strColor;
					strMsg += ",";
					strMsg += (content.m_FontInfo.m_bBold ? "1" : "0");
					strMsg += ",";
					strMsg += (content.m_FontInfo.m_bItalic ? "1" : "0");
					strMsg += ",";
					strMsg += (content.m_FontInfo.m_bUnderLine ? "1" : "0");
					strMsg += "\"]";
			} else if (ContentType.CONTENT_TYPE_TEXT == content.m_nType) {
				String strText = new String(content.m_strText);
				strText = strText.replace("/", "//");
				strMsg += strText;
// Path: app/src/main/java/com/wyp/materialqqlite/qqclient/msglog/SessMsgLog.java
// public class SessMsgLog {	// 临时会话(群成员)消息记录
// 	public int m_nID;
// 	public int m_nQQNum;
// 	public String m_strNickName;
// 	public int m_nTime;
// 	public boolean m_bSendFlag;
// 	public String m_strContent;
// }
// 
// Path: app/src/main/java/com/wyp/materialqqlite/qqclient/protocol/protocoldata/Content.java
// public class Content {
// 	public ContentType m_nType;			// 内容类型
// 	public FontInfo m_FontInfo;			// 字体信息
// 	public String m_strText;			// 文本信息
// 	public int m_nFaceId;				// 系统表情Id
// 	public CustomFaceInfo m_CFaceInfo;	// 自定义表情信息
// 	
// 	public Content() {
// 		m_nType = ContentType.CONTENT_TYPE_UNKNOWN;
// 		m_FontInfo = new FontInfo();
// 		m_CFaceInfo = new CustomFaceInfo();
// 	}
// }
// 
// Path: app/src/main/java/com/wyp/materialqqlite/qqclient/protocol/protocoldata/ContentType.java
// public enum ContentType {
// 	CONTENT_TYPE_UNKNOWN,
// 	CONTENT_TYPE_FONT_INFO,
// 	CONTENT_TYPE_TEXT,
// 	CONTENT_TYPE_FACE,
// 	CONTENT_TYPE_CUSTOM_FACE,
// 	CONTENT_TYPE_OFF_PIC
// }


// Path: app/src/main/java/com/wyp/materialqqlite/qqclient/QQUtils.java
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import com.wyp.materialqqlite.Utils;
import com.wyp.materialqqlite.qqclient.msglog.BuddyMsgLog;
import com.wyp.materialqqlite.qqclient.msglog.GroupMsgLog;
import com.wyp.materialqqlite.qqclient.msglog.SessMsgLog;
import com.wyp.materialqqlite.qqclient.protocol.protocoldata.BuddyMessage;
import com.wyp.materialqqlite.qqclient.protocol.protocoldata.Content;
import com.wyp.materialqqlite.qqclient.protocol.protocoldata.ContentType;
import com.wyp.materialqqlite.qqclient.protocol.protocoldata.GroupMessage;
import com.wyp.materialqqlite.qqclient.protocol.protocoldata.SessMessage;

	
	// "/f["系统表情id"] /c["自定义表情文件名"] /o["字体名称，大小，颜色，加粗，倾斜，下划线"]"
	public static String formatContent(ArrayList<Content> arrContent) {
		String strMsg = "";

		for (int i = 0; i < arrContent.size(); i++) {
			Content content = arrContent.get(i);
			if (null == content)
				continue;

			if (ContentType.CONTENT_TYPE_FONT_INFO == content.m_nType) {
					String strColor = Utils.RGBToHexStr(content.m_FontInfo.m_clrText);

					strMsg += "/o[\"";
					strMsg += content.m_FontInfo.m_strName;
					strMsg += ",";
					strMsg += content.m_FontInfo.m_nSize;
					strMsg += ",";
					strMsg += strColor;
					strMsg += ",";
					strMsg += (content.m_FontInfo.m_bBold ? "1" : "0");
					strMsg += ",";
					strMsg += (content.m_FontInfo.m_bItalic ? "1" : "0");
					strMsg += ",";
					strMsg += (content.m_FontInfo.m_bUnderLine ? "1" : "0");
					strMsg += "\"]";
			} else if (ContentType.CONTENT_TYPE_TEXT == content.m_nType) {
				String strText = new String(content.m_strText);
				strText = strText.replace("/", "//");
				strMsg += strText;
			} else if (ContentType.CONTENT_TYPE_FACE == content.m_nType) {