package jp.sourceforge.nicoro;

import android.content.Context;

public class MessageLoaderFork extends MessageLoader {
	private String mFork;
	
	public MessageLoaderFork(String url, String threadId, String cookie,
			String userId, String threadKey, String force184,
			Context context) {
		super(url, threadId, cookie, userId, threadKey, force184, context);
	}

	@Override
	protected String createXmlForRequest() {
		StringBuilder body = new StringBuilder(256)
		.append("<thread res_from=\"-")
		.append(mResSize)
		.append("\" version=\"20061206\" thread=\"")
		.append(mThreadId)
		.append("\" user_id=\"")
		.append(mUserId);
		if (mThreadKey != null) {
			body.append("\" threadkey=\"").append(mThreadKey);
		}
		if (mForce184 != null) {
			body.append("\" force_184=\"").append(mForce184);
		}
		body.append("\" fork=\"1\" />");
		return body.toString();
	}
	
	@Override
	protected MessageChat createMessageChat(String m, int v) {
		return new MessageChatFork(m, v);
	}
}
