package TestApp01_call;

import java.util.StringJoiner;

import com.global.api.terminals.abstractions.IDeviceInterface;
import com.global.api.terminals.messaging.IBroadcastMessageInterface;

public class addtnlData {
	public addtnlData() {

	}

	String _respMsgText = " ";
	String _respDataText = " ";

	private String parseArray(String[] array) {
		StringJoiner joiner = new StringJoiner("");
		for (int i = 0; i < array.length; i++) {
			joiner.add(array[i]);
		}

		return joiner.toString();
	}

	public String get_respMsgText(IDeviceInterface device, IBroadcastMessageInterface _broadcastReceived) {
		String[] bReceived = {};
//		device.setOnBroadcastMessageReceived(new IBroadcastMessageInterface() {
//			public void broadcastReceived(String code, String message) {
//				if (_broadcastReceived != null) {
//					bReceived[0] = code;
//					bReceived[1] = message;
//					_broadcastReceived.broadcastReceived(code, message);
//				}
//			}
//		});
		
		return parseArray(bReceived);
	}

	public void set_respMsgText(String _respMsgText) {
		this._respMsgText = _respMsgText;
	}

	public String get_respDataText() {
		return _respDataText;
	}

	public void set_respDataText(String _respDataText) {
		this._respDataText = _respDataText;
	}
}
