package com.team5.aLife.BaseStation;

import com.google.gson.Gson;

public abstract class AbstractReply {
	
final static protected int LOGIN_REPLY = 101;
final static protected int GET_ALL_DEVICES_REPLY = 102;
final static protected int ADD_DEVICE_REPLY = 103;
final static protected int GET_ALL_USERS_REPLY = 104;
final static protected int ADD_USER_REPLY = 105;
final static protected int GET_ALL_NOTIFICATIONS_REPLY = 106;
final static protected int GET_DEVICE_REPLY	= 107;
final static protected int GET_USERS_NOTIFICATION_REPLY = 108;

	int replyType;
	
	public String encodeToReplyString(){
		Gson gson = new Gson();

		String delimiter = "&";
		
		return getReplyType() + delimiter + gson.toJson(this);
	}
	
	public abstract int getReplyType();

}
