package com.madeu.util;

public class CommonConst {
	
	/******************************************************************************
	 * Common Code
	 ******************************************************************************/
	
	public static final String SUCCESS = "SUCCESS";
	public static final String FAIL = "FAIL";
	
	public static final String GCM = "G";				// GCM
	public static final String APNS = "A";				// APNS
	public static final String FCM = "F";			// FCM
	
	public static final String SEND_WAIT = "SSCQ";		// Push 입력후 전송 전(대기상태)
	public static final String SEND_SUCCESS = "SSCS";	// Push 발송성공
	public static final String SEND_ERROR = "SSCE";		// Push 발송실패
	
	
	/******************************************************************************
	 * ERROR Code
	 ******************************************************************************/
	// 잘못된 Request
	public static final int E_BAD_REQUEST = 400;
	
	// 인증오류
	public static final int E_UN_AUTHORIZED = 401;
	
	// 필수 파라미터 누락
	public static final int E_NOT_FOUND_PARAM = 402;
	
	// HTTP Forbidden
	public static final int E_HTTP_FORBIDDEN = 403;
	
	// HTTP Not Found
	public static final int E_HTTP_NOT_FOUND = 404;
	
	// 데이터 변환 에러
	public static final int E_OBJECT_CONVERT = 405;
	
	// Delay 에러
	public static final int E_DELAY = 406;
	
	// Not Exist RegistID / App이 삭제되어 REG_ID가 더 이상 유효하지 않은 경우
	public static final int E_NOT_EXIST_REGID = 410;
	
	// 해당 서비스 중지
	public static final int E_STOP_SERVICE = 411;
	
	// Precondition Failed / Regist ID 유효성 확인 실패
	public static final int E_PRECONDITION_FAILED = 412;
	
	// 해당 서비스가 존재하지 않습니다.
	public static final int E_NOT_EXIST_SERVICE = 413;
	
	// GCM 전송장애
	public static final int E_GCM_SEND = 600;
		
	public static final int E_GCM_QUOTA_EXCEEDED = 601;
  
	public static final int E_GCM_DEVICE_QUOTA_EXCEEDED = 602;
  
	public static final int E_GCM_MISSING_REGISTRATION = 603;
  
	public static final int E_GCM_INVALID_REGISTRATION = 604;
  
	public static final int E_GCM_MISMATCH_SENDER_ID = 605;
  
	public static final int E_GCM_NOT_REGISTERED = 606;
  
	public static final int E_GCM_MESSAGE_TOO_BIG = 607;
  
	public static final int E_GCM_MISSING_COLLAPSE_KEY = 608;
	
	public static final int E_GCM_UNAVAILABLE = 609;
  
	public static final int E_GCM_INTERNAL_SERVER_ERROR = 610;
  
	public static final int E_GCM_INVALID_TTL = 611;
	
	
	public static final int E_APNS_SEND = 701;
	
	// 에러 처리중
	public static final int E_APNS_PROCESS = 702;
	
	// device token 이 없음
	public static final int E_APNS_NOT_FOUND_DEVICE_TOKEN = 703;
	
	// topic이 없음
	public static final int E_APNS_NOT_FOUND_TOPIC = 704;
	
	// payload 없음
	public static final int E_APNS_NOT_FOUND_PAYLOAD = 705;
	
	// 잘못된 token 크기
	public static final int E_APNS_TOKEN_MISSING_SIZE = 706;
	
	// 잘못된 topic 크기
	public static final int E_APNS_TOPIC_MISSING_SIZE = 707;
	
	// 잘못된 payload 크기
	public static final int E_APNS_PAYLOAD_MISSING_SIZE = 708;
	
	// 잘못된 token
	public static final int E_APNS_MISSING_TOKEN = 709;
	
	// 알수없음
	public static final int E_APNS_UNIDENTIFIED = 710;
	
	// 알수 없는 전송방식 장애 
	public static final int E_SEND_TYPE = 801;
		
	// PUSH DB 접속 오류
	public static final int E_PUSHDB_CONNECT = 1000;
	
	// PUSH DB 조회 오류
	public static final int E_PUSHDB_SELECT = 1001;
	
	// PUSH DB 등록 오류
	public static final int E_PUSHDB_INSERT = 1002;
		
	// PUSH DB 삭제 오류
	public static final int E_PUSHDB_DELETE = 1003;
	
	// PUSH DB 업데이트 오류
	public static final int E_PUSHDB_UPDATE = 1004;
	
	// 알수 없는 오류
	public static final int E_UNIDENTIFIED = 9999;
	
	// FCM 전송장애
	// https://firebase.google.com/docs/reference/fcm/rest/v1/ErrorCode 참조 
	// https://firebase.google.com/docs/cloud-messaging/admin/errors?hl=ko 참조 
	public static final int E_FCM_SEND = 2000;
		
	public static final int E_FCM_UNSPECIFIED_ERROR = 2001;
  
	public static final int E_FCM_INVALID_ARGUMENT = 2002;
  
	public static final int E_FCM_UNREGISTERED = 2003;
  
	public static final int E_FCM_SENDER_ID_MISMATCH = 2004;
  
	public static final int E_FCM_QUOTA_EXCEEDED = 2005;
  
	public static final int E_FCM_APNS_AUTH_ERROR = 2006;
  
	public static final int E_FCM_UNAVAILABLE = 2007;
  
	public static final int E_FCM_INTERNAL = 2008;
	
}
