/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012-2017 gnosygnu@gmail.com

XOWA is licensed under the terms of the General Public License (GPL) Version 3,
or alternatively under the terms of the Apache License Version 2.0.

You may use XOWA according to either of these licenses as is most appropriate
for your project on a case-by-case basis.

The terms of each license can be found in the source code repository:

GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.xowa.files.repos; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*;
public class Xof_repo_pair implements Gfo_invk {
	public Xof_repo_pair(byte id, byte[] wiki_domain, Xof_repo_itm src, Xof_repo_itm trg) {
		this.id = id; this.wiki_domain = wiki_domain; this.src = src; this.trg = trg;
	}
	public byte				Id()			{return id;} private byte id;
	public byte[]			Wiki_domain()	{return wiki_domain;} private byte[] wiki_domain;
	public Xof_repo_itm		Src()			{return src;} private final    Xof_repo_itm src;
	public Xof_repo_itm		Trg()			{return trg;} private final    Xof_repo_itm trg;
	public void Wiki_domain_(byte[] v) {wiki_domain = v;}

	public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
		if		(ctx.Match(k, Invk_repo_id_))		id = m.ReadByte("v");
		else	return Gfo_invk_.Rv_unhandled;
		return this;
	}	private static final String Invk_repo_id_ = "repo_id_";
}
