/*
 * Copyright (c) 2015. Ncomz. All Rights Reserved
 */

package com.ntels.kneet.v3.common.http;

import android.app.Dialog;
import android.content.Context;
import android.os.AsyncTask;
import android.view.ViewGroup.LayoutParams;
import android.widget.ProgressBar;

import com.ntels.kneet.v3.common.AppConfig;
import com.ntels.kneet.v3.common.Constants;
import com.ntels.kneet.v3.common.exception.RequestUnsuccessfulException;
import com.ntels.kneet.v3.common.c_interface.OnDataSendToReslut;
import com.ntels.kneet.v3.common.c_interface.OnTaskExecutionFinished;
import com.ntels.kneet.v3.common.util.Dlog;
import com.ntels.kneet.v3.common.util.Util;
import com.ntels.kneet.v3.R;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public class HttpSend {

    private AppConfig appConfig;
    private static final String  TAG             = HttpSend.class.getSimpleName();
    public static final  long    DEFAULT_TIMEOUT = 5000;
    private              Util    util            = new Util();
    public final static  int     ENC_NOT         = 10200;
    public final static  int     ENC_AES         = 10201;
    private              boolean bDialog         = true;
    private              boolean bDim            = true;
    protected Context context;
    public HttpSend(Context context) {

        appConfig = (AppConfig) context.getApplicationContext();
        this.context = context;
    }

    public HttpSend(Context context, boolean bDialog) {

        appConfig = (AppConfig) context.getApplicationContext();
        this.context = context;
        this.bDialog = bDialog;
    }

    public HttpSend(Context context, boolean bDialog, boolean bDim) {

        appConfig = (AppConfig) context.getApplicationContext();
        this.context = context;
        this.bDialog = bDialog;
        this.bDim = bDim;
    }
    /**
     * <PRE>
     * 1. MethodName: P_member
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST]회원 가입 등록(회원 가입 정보를 입력 완료 후 인증 이메일을 발송한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_member(String sHTTP_nickname, String sHTTP_email_id, String sHTTP_password, String sHTTP_service_id, String sHTTP_os_type, String sHTTP_country_code, String sHTTP_timezone_name, String sHTTP_image_file, String sHTTP_image_file_path) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_member);
            //            sSendType = Constants.SEND_TYPE_POST;
            sSendType = Constants.SEND_TYPE_MULTIPART;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            /** 이름 */
            addParameter(alPost, Constants.HTTP_nickname, sHTTP_nickname);
            /** 이메일 ID */
            addParameter(alPost, Constants.HTTP_email_id, sHTTP_email_id);
            /** 패스워드 */
            addParameter(alPost, Constants.HTTP_password, sHTTP_password);
            /** 서비스 ID (10001 : Kneet, 10002 : COMMAX, 10003 : HUMAX) */
            addParameter(alPost, Constants.HTTP_service_id, sHTTP_service_id);
            /** OS 유형 (MA : 안드로이드, MI : IOS) */
            addParameter(alPost, Constants.HTTP_os_type, sHTTP_os_type);
            /** 국가 코드 (default : KR) */
            addParameter(alPost, Constants.HTTP_country_code, sHTTP_country_code);
            /** 타임존 아이디 (default : 210) */
            addParameter(alPost, Constants.HTTP_timezone_name, sHTTP_timezone_name);

            sFileParamName = sHTTP_image_file;
            sFilePath = sHTTP_image_file_path;
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_member_auth_mail
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST]이메일 인증 메일 재발송(회원 이메일 인증 메일을 재발송한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_member_auth_mail(String sHTTP_email_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_member_auth_mail);
            sSendType = Constants.SEND_TYPE_POST;
            /** 이메일 ID */
            addParameter(alPost, Constants.HTTP_email_id, sHTTP_email_id);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_member_login
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST]회원 로그인(회원 로그인을 처리한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_member_login(String sHTTP_email_id, String sHTTP_password, String sHTTP_service_id, String sHTTP_os_type, String sHTTP_device_sn, String sHTTP_device_token, String sHTTP_device_name, String sHTTP_device_hostname) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_member_login);
            sSendType = Constants.SEND_TYPE_POST;
            /** 이메일 ID */
            addParameter(alPost, Constants.HTTP_email_id, sHTTP_email_id);
            /** 패스워드 */
            addParameter(alPost, Constants.HTTP_password, sHTTP_password);
            /** 서비스 ID (10001 : Kneet) */
            addParameter(alPost, Constants.HTTP_service_id, sHTTP_service_id);
            /** OS 유형 (MA : 안드로이드, MI : IOS) */
            addParameter(alPost, Constants.HTTP_os_type, sHTTP_os_type);
            addParameter(alPost, Constants.HTTP_device_sn, sHTTP_device_sn);
            addParameter(alPost, Constants.HTTP_device_token, sHTTP_device_token);
            addParameter(alPost, Constants.HTTP_device_name, sHTTP_device_name);
            addParameter(alPost, Constants.HTTP_device_hostname, sHTTP_device_hostname);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_member_homegrp
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][폐기] 홈그룹 생성(회원의 홈그룹을 생성한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_member_homegrp(String sHTTP_homegrp_name, String sHTTP_location_coordinate, String sHTTP_location_addr, String sHTTP_location_radius) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_member_homegrp);
            sSendType = Constants.SEND_TYPE_POST;
            /** 홈그룹 이름 */
            addParameter(alPost, Constants.HTTP_homegrp_name, sHTTP_homegrp_name);
            /** 홈그룹 좌표(포맷 : 위도,경도) */
            addParameter(alPost, Constants.HTTP_location_coordinate, sHTTP_location_coordinate);
            /** 홈그룹 주소 */
            addParameter(alPost, Constants.HTTP_location_addr, sHTTP_location_addr);
            /** 홈 그룹 좌표 반경 (ex : 100, 200, 300) */
            addParameter(alPost, Constants.HTTP_location_radius, sHTTP_location_radius);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_homegrp
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST] (홈그룹에 속해 있지 않은 회원이 마스터가 되는) 홈그룹을 새로 생성한다.
     * 4. Developer : 정백호
     * 5. Created   : 2016. 07.
     * </PRE>
     */
    public void P_homegrp() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_homegrp);
            sSendType = Constants.SEND_TYPE_POST;

            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_member_new_mobile_device
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST]새 단말(장치) 인증(새로운 단말로 로그인 시 단말(장치) 인증 번호를 확인하고, 단말(장치)을 등록 처리한다. (기존 단말(장치)을 대체할 경우의 처리도 포함))
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_member_new_mobile_device(String sHTTP_key, String sHTTP_email_id, String sHTTP_service_id, String sHTTP_os_type, String sHTTP_device_sn, String sHTTP_device_token, String sHTTP_device_name, String sHTTP_device_hostname) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_member_new_mobile_device);
            sSendType = Constants.SEND_TYPE_POST;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            /** ket */
            addParameter(alPost, Constants.HTTP_key, sHTTP_key);
            /** 이메일 ID */
            addParameter(alPost, Constants.HTTP_email_id, sHTTP_email_id);
            /** 서비스 ID (10001 : Kneet) */
            addParameter(alPost, Constants.HTTP_service_id, sHTTP_service_id);
            /** OS 유형 (MA : 안드로이드, MI : IOS) */
            addParameter(alPost, Constants.HTTP_os_type, sHTTP_os_type);
            addParameter(alPost, Constants.HTTP_device_sn, sHTTP_device_sn);
            addParameter(alPost, Constants.HTTP_device_token, sHTTP_device_token);
            addParameter(alPost, Constants.HTTP_device_name, sHTTP_device_name);
            addParameter(alPost, Constants.HTTP_device_hostname, sHTTP_device_hostname);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_member_password
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST]비밀번호 찾기 (재설정)(입력된 이메일 ID 정보로 비밀번호 찾기를 위한 메일 발송을 처리한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_member_password(String sHTTP_email_id, String sHTTP_service_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_member_password);
            sSendType = Constants.SEND_TYPE_POST;
            /** 이메일 ID */
            addParameter(alPost, Constants.HTTP_email_id, sHTTP_email_id);
            addParameter(alPost, Constants.HTTP_service_id, sHTTP_service_id);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_member_logout
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET]회원 로그아웃(회원 로그아웃을 처리한다. (인증 토큰 무효화))
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_member_logout() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_member_logout);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_member
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET]회원 로그인 정보 조회 및 푸시 토큰 등록/수정(인증 토큰을 기준으로 회원의 로그인 정보를 조회하고 푸시 토큰을 등록/수정한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_member(String sHTTP_device_sn, String sHTTP_device_token, String sHTTP_os_type, String sHTTP_device_hostname) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_member);
            sSendType = Constants.SEND_TYPE_PUT;
            /** 단말 일련번호 (애플 기기 : UUID / 안드로이드 기기 : IMEI or Mac Address) */
            addParameter(alPost, Constants.HTTP_device_sn, sHTTP_device_sn);
            /** 푸시노티 토큰 (애플 기기 : device token / 안드로이드 기기 : reg id) */
            addParameter(alPost, Constants.HTTP_device_token, sHTTP_device_token);
            addParameter(alPost, Constants.HTTP_os_type, sHTTP_os_type);
            addParameter(alPost, Constants.HTTP_device_hostname, sHTTP_device_hostname);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_member_replace_device
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST]단말(장치) 제한 도달시 새 단말(장치) 인증 메일 발송(이미 보유 단말(장치) 제한에 도달된 상태에서 새 단말(장치) 로그인을 시도하는 경우, 해당 단말(장치)에 대한 인증 메일을 발송한다. (그 후 10.5로 진행))
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_member_replace_device(String sHTTP_email_id, String sHTTP_password, String sHTTP_service_id, String sHTTP_device_sn) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_member_replace_device);
            sSendType = Constants.SEND_TYPE_POST;
            /** 이메일 ID */
            addParameter(alPost, Constants.HTTP_email_id, sHTTP_email_id);
            /** 패스워드 */
            addParameter(alPost, Constants.HTTP_password, sHTTP_password);
            /** 서비스 id*/
            addParameter(alPost, Constants.HTTP_service_id, sHTTP_service_id);
            /** 디바이스 sn */
            addParameter(alPost, Constants.HTTP_device_sn, sHTTP_device_sn);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_member_member_id_update_field
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][REST]회원 정보 수정(가입된 이메일, 비밀번호, 이름 정보에 대해 변경 처리한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_member_member_id_update_field(String sHTTP_member_id, String sHTTP_update_field, String sHTTP_new_email_id, String sHTTP_old_password, String sHTTP_new_password, String sHTTP_confirm_password, String sHTTP_nickname, String sHTTP_image_file_name) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_member_member_id_update_field);
            sSendType = Constants.SEND_TYPE_PUT;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_update_field, sHTTP_update_field);
            if ( sHTTP_update_field.equals("email") ) {
                /** 신규 이메일 ID(변경구분 : email 일때 필수) */
                addParameter(alPost, Constants.HTTP_new_email_id, sHTTP_new_email_id);
            } else if ( sHTTP_update_field.equals("password") ) {
                /** 현재 비밀번호(변경구분 : password 일때 필수) */
                addParameter(alPost, Constants.HTTP_old_password, sHTTP_old_password);
                /** 새 비밀번호(변경구분 : password 일때 필수) */
                addParameter(alPost, Constants.HTTP_new_password, sHTTP_new_password);
                /** 비밀번호 확인(변경구분 : password 일때 필수) */
                addParameter(alPost, Constants.HTTP_confirm_password, sHTTP_confirm_password);
            } else if ( sHTTP_update_field.equals("name") ) {
                /** 이름(변경구분 : name 일때 필수) */
                addParameter(alPost, Constants.HTTP_nickname, sHTTP_nickname);
            } else if ( sHTTP_update_field.equals("profile") ) {
                /** 이름(변경구분 : name 일때 필수) */
                addParameter(alPost, Constants.HTTP_image_file_name, sHTTP_image_file_name);
            }
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_member_member_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][REST](기존) 비밀번호 확인(비밀번호 정보를 확인한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_member_member_id(String sHTTP_member_id, String sHTTP_password) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_member_member_id);
            sSendType = Constants.SEND_TYPE_GET;
            /** 비밀번호 */
            addParameter(alPost, Constants.HTTP_password, sHTTP_password);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: D_member_member_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [DELETE][REST]회원 탈퇴 (계정 삭제)(회원의 계정을 삭제 처리한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void D_member_member_id() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_D_member_member_id);
            sSendType = Constants.SEND_TYPE_DELETE;
            //sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            //sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            /** 비밀번호 */
            //addParameter(alPost, Constants.HTTP_password, sHTTP_password);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_homegrp_name
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][페기] 홈그룹 이름 변경(회원의 홈그룹 이름을 변경한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_homegrp_name(String sHTTP_homegrp_id, String sHTTP_homegrp_name) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_homegrp_name);
            sSendType = Constants.SEND_TYPE_POST;
            //sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            addParameter(alPost, Constants.HTTP_homegrp_id, sHTTP_homegrp_id);
            addParameter(alPost, Constants.HTTP_homegrp_name, sHTTP_homegrp_name);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_homegrp_location
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][폐기] 홈그룹 홈 위치 설정(회원의 홈그룹 위치 정보를 등록 또는 변경 한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_homegrp_location(String sHTTP_homegrp_id, String sHTTP_location_coordinate, String sHTTP_location_addr, String sHTTP_location_radius) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_homegrp_location);
            sSendType = Constants.SEND_TYPE_POST;
            /** 홈그룹 이름 */
            addParameter(alPost, Constants.HTTP_homegrp_id, sHTTP_homegrp_id);
            /** 홈그룹 좌표(포맷 : 위도,경도) */
            addParameter(alPost, Constants.HTTP_location_coordinate, sHTTP_location_coordinate);
            /** 홈그룹 주소 */
            addParameter(alPost, Constants.HTTP_location_addr, sHTTP_location_addr);
            /** 홈 그룹 좌표 반경 (ex : 100, 200, 300) */
            addParameter(alPost, Constants.HTTP_location_radius, sHTTP_location_radius);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: D_homegrp_homegrp_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [DELETE][REST][폐기] 홈그룹 삭제(회원의 홈그룹을 삭제 처리한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void D_homegrp_homegrp_id(String sHTTP_homegrp_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_D_homegrp_homegrp_id);
            sSendType = Constants.SEND_TYPE_DELETE;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_homegrp_id, sHTTP_homegrp_id);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_member_devices
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][폐기] 단말(장치) 관리(회원의 단말(장치) 목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_member_devices(String sHTTP_device_sn) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_member_devices);
            sSendType = Constants.SEND_TYPE_GET;
            addParameter(alPost, Constants.HTTP_device_sn, sHTTP_device_sn);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: D_member_device
     * 2. ClassName : HttpSend
     * 3. Comment   : [DELETE][폐기] 단말(장치) 등록 해제(회원의 단말(장치)을 등록 해제 처리한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void D_member_device(String sHTTP_device_sn, String sHTTP_login_status) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_D_member_device);
            sSendType = Constants.SEND_TYPE_DELETE;
            addParameter(alPost, Constants.HTTP_device_sn, sHTTP_device_sn);
            addParameter(alPost, Constants.HTTP_login_status, sHTTP_login_status);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_member_icons
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][폐기] 프로필 이미지 목록 조회(프로필 이미지 목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_member_icons() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_member_icons);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_homegrps
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][폐기] 홈그룹 리스트 목록 조회(회원의 홈그룹 목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_homegrps(String sHTTP_device_sn) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_homegrps);
            sSendType = Constants.SEND_TYPE_GET;
            /** 단말 일련번호 (애플 기기 : UUID / 안드로이드 기기 : IMEI or Mac Address) */
            addParameter(alPost, Constants.HTTP_device_sn, sHTTP_device_sn);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_homegrp_members
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET]홈그룹 멤버 목록 조회(홈그룹의 멤버 목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_homegrp_members() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_homegrp_members);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_homegrp_members
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST]홈그룹 멤버 초대(홈그룹의 멤버를 초대한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_homegrp_members(String sBodyVal) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_homegrp_members);
            sSendType = Constants.SEND_TYPE_POST1;
            sBody = sBodyVal;
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: D_homegrp_members
     * 2. ClassName : HttpSend
     * 3. Comment   : [DELETE]홈그룹 멤버 강퇴 / 초대 취소(홈그룹으로 초대받은 멤버의 정보를 변경한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void D_homegrp_members(String sHTTP_member_ids, String sHTTP_invitation_hist_ids) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_D_homegrp_members);
            sSendType = Constants.SEND_TYPE_DELETE;
            addParameter(alPost, Constants.HTTP_member_ids, sHTTP_member_ids);
            addParameter(alPost, Constants.HTTP_invitation_hist_ids, sHTTP_invitation_hist_ids);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_homegrp_members_invitations
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST]홈그룹 초대 알림(홈초대 알림 화면에서 승락/거절 처리를 한다. (+ 초대 수락 처리 후에 나머지 요청은 거절한다.))
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_homegrp_members_invitations(String sHTTP_homegrp_id, String sHTTP_status_code, String sHTTP_authorization_reply) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_homegrp_members_invitations);
            sSendType = Constants.SEND_TYPE_POST;
            addParameter(alPost, Constants.HTTP_homegrp_id, sHTTP_homegrp_id);
            addParameter(alPost, Constants.HTTP_status_code, sHTTP_status_code);
            if ( !sHTTP_authorization_reply.equals("") ) {
                addParameter(alPost, Constants.HTTP_authorization_reply, sHTTP_authorization_reply);
            }
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_homegrp_members_validation
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET]홈그룹 멤버 초대 유효성 체크(초대 대상자의 유효성을 체크한다. (홈허브가 없는 홈의 회원 또는 홈이 없는 회원/비회원만 가능))
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_homegrp_members_validation(String sHTTP_target_email) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_homegrp_members_validation);
            sSendType = Constants.SEND_TYPE_GET;
            addParameter(alPost, Constants.HTTP_target_email, sHTTP_target_email);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_homegrp_more_info
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST]홈그룹 정보 조회(홈그룹의 상세정보를 조회한다. (모드목록, 공지,알림 갯수등.))
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_homegrp_more_info() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_homegrp_more_info);
            sSendType = Constants.SEND_TYPE_POST;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    /**
     * <PRE>
     * 1. MethodName: D_homegrp_members_member_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [DELETE][REST]홈그룹 (자진) 탈퇴(일반 등급의 홈그룹 멤버를 홈그룹에서 자진 탈퇴 처리한다.) 12.11
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void D_homegrp_members_member_id() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_D_homegrp_members_member_id);
            sSendType = Constants.SEND_TYPE_DELETE;
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_member_profile_image
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST]멤버 이미지 변경(멤버의 프로필 이미지를 수정.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_member_profile_image(String sHTTP_image_file, String sHTTP_image_file_path) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_member_profile_image);
            sSendType = Constants.SEND_TYPE_MULTIPART;
            /** 이메일 ID */
            sFileParamName = sHTTP_image_file;
            sFilePath = sHTTP_image_file_path;

            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_homegrp_profile_image
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST]홈그룹 이미지 변경(홈그룹의 프로필 이미지를 수정.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_homegrp_profile_image(String sHTTP_image_file, String sHTTP_image_file_path) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_homegrp_profile_image);
            sSendType = Constants.SEND_TYPE_MULTIPART;
            /** 이메일 ID */
            sFileParamName = sHTTP_image_file;
            sFilePath = sHTTP_image_file_path;

            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_homegrp_members_invitations
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET]홈그룹 초대 목록(초대받은 홈그룹 목록을 호출)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_homegrp_members_invitations() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_homegrp_members_invitations);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_homegrp_homegrp_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][REST]홈그룹 정보조회(홈그룹 정보를 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_homegrp_homegrp_id() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_homegrp_homegrp_id);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_modes
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET]홈모드 조회(홈그룹의 홈모드 목록을 불러온다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_modes() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_modes);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_modes_mode_id_current_mode
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][REST]현재 홈모드 변경(현재 홈모드를 변경한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_modes_mode_id_current_mode(String sHTTP_mode_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_modes_mode_id_current_mode);
            sSendType = Constants.SEND_TYPE_PUT;
            addParameter(alPost, Constants.HTTP_mode_id, sHTTP_mode_id);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_dashboard
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET]대시보드 정보 조회(홈그룹 모드 조회, 공지, 알림 갯수 조회 등)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_dashboard(String sHTTP_read_datetime) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_dashboard);
            sSendType = Constants.SEND_TYPE_GET;
            /** 이메일 ID */
            addParameter(alPost, Constants.HTTP_read_datetime, sHTTP_read_datetime);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_homelog
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][폐기] 홈로그 조회(홈로그 목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_homelog(String sHTTP_paging_datetime, String sHTTP_paging_type) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_homelog);
            sSendType = Constants.SEND_TYPE_GET;
            //sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            /** 페이징 기준일시(최초 조회시 NULL) ex)20150101151515 */
            addParameter(alPost, Constants.HTTP_paging_datetime, sHTTP_paging_datetime);
            /** 페이징 유형(U:Upward, D:Downward) */
            addParameter(alPost, Constants.HTTP_paging_type, sHTTP_paging_type);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_homelog_count
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][폐기] 홈로그 개수 조회(특정 시간 이후에 등록된 홈로그 개수를 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_homelog_count(String sHTTP_last_create_datetime) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_homelog_count);
            sSendType = Constants.SEND_TYPE_GET;
            //sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            /** 20.4 create_datetime(년월일시분초) ex)20150101151515  */
            addParameter(alPost, Constants.HTTP_last_create_datetime, sHTTP_last_create_datetime);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_notices_count
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET]공지사항 / 알림 갯수 조회(공지사항 및 알림 갯수를 조회한다. (notice_count 수정 필요 설계 이전이라 임시데이타 출력))
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_notices_count() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_notices_count);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_notices_personal
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET]알림 조회(알림 목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_notices_personal(String sHTTP_push_noti_hist_id, String sHTTP_paging_type) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_notices_personal);
            sSendType = Constants.SEND_TYPE_GET;
            /** 이메일 인증키 */
            addParameter(alPost, Constants.HTTP_push_noti_hist_id, sHTTP_push_noti_hist_id);
            addParameter(alPost, Constants.HTTP_paging_type, sHTTP_paging_type);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_notices
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET]공지사항 조회(공지사항 목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_notices(String sHTTP_notice_id, String sHTTP_paging_type, String sHTTP_read_datetime) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_notices);
            sSendType = Constants.SEND_TYPE_GET;
            /** 이메일 인증키 */
            addParameter(alPost, Constants.HTTP_notice_id, sHTTP_notice_id);
            addParameter(alPost, Constants.HTTP_paging_type, sHTTP_paging_type);
            addParameter(alPost, Constants.HTTP_read_datetime, sHTTP_read_datetime);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_modes_mode_id_status
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][REST]홈모드 변경 결과 조회(현재 홈모드 변경으로 장치를 제어한 결과를 조회한다.20.9) 20.9
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_modes_mode_id_status(String sHTTP_mode_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_modes_mode_id_status);
            sSendType = Constants.SEND_TYPE_GET;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_mode_id, sHTTP_mode_id);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_devices
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET]장치 리스트 조회(회원의 장치 목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_devices() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_devices);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_devices_device_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][REST]노드 상세 조회(해당 장치의 상세 정보를 조회한다. (장치가 보유한 모든 커맨드 클래스 리스트를 보여준다.))
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_devices_device_id(String sHTTP_device_id, String sHTTP_node_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_devices_device_id);
            sSendType = Constants.SEND_TYPE_GET;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_node_id, sHTTP_node_id);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_devices_device_id_nodes_node_id_commands
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][REST]노드(커맨드클래스) 제어 명령 실행(노드(커맨드클래스) 제어 명령을 실행한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_devices_device_id_nodes_node_id_commands(String sHTTP_device_id, String sHTTP_node_id, String sHTTP_request_value) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_devices_device_id_nodes_node_id_commands);
            sSendType = Constants.SEND_TYPE_POST;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_node_id, sHTTP_node_id);
            /** 요청 값 */
            addParameter(alPost, Constants.HTTP_request_value, sHTTP_request_value);
            //            /** 요청 값의 타입 (TEXT / JSON) */
            //            if ( !util.null2string(sHTTP_request_value_type).equals("") ) {
            //                addParameter(alPost, Constants.HTTP_request_value_type, sHTTP_request_value_type);
            //            }
            //            /** 커맨드 종류 */
            //            if ( !util.null2string(sHTTP_command_type).equals("") ) {
            //                addParameter(alPost, Constants.HTTP_command_type, sHTTP_command_type);
            //            }
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_devices_device_id_nodes_node_id_status
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][REST]노드(커맨드클래스) 마지막 상태 값 조회(해당 노드(커맨드클래스)의 마지막 상태 값을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_devices_device_id_nodes_node_id_status(String sHTTP_device_id, String sHTTP_node_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_devices_device_id_nodes_node_id_status);
            sSendType = Constants.SEND_TYPE_GET;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_node_id, sHTTP_node_id);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_devices_property_device_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][REST]장치 명/아이콘 변경(장치 이름 또는 아이콘을 변경한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_devices_property_device_id(String sHTTP_device_id, String sHTTP_node_id, String sHTTP_device_name) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_devices_property_device_id);
            sSendType = Constants.SEND_TYPE_PUT;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_node_id, sHTTP_node_id);
            addParameter(alPost, Constants.HTTP_device_name, sHTTP_device_name);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_devices_icons_device_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][REST]장치 아이콘 목록 조회(장치 유형별 선택할 수 있는 아이콘 목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_devices_icons_device_id(String sHTTP_device_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_devices_icons_device_id);
            sSendType = Constants.SEND_TYPE_GET;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: D_devices_device_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [DELETE][REST]장치 삭제(장치를 삭제하고 규칙/제어를 정지상태로 변경한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void D_devices_device_id(String sHTTP_device_id, String sHTTP_device_key) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_D_devices_device_id);
            sSendType = Constants.SEND_TYPE_DELETE;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            /** 디바이스키 */
            addParameter(alPost, Constants.HTTP_device_key, sHTTP_device_key);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_devices_device_id_commands_status
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][REST]하위 장치 추가 제어 명령 실행 (인클루전)(하위 장치 추가 가능 상태로 제어 명령을 실행한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_devices_device_id_commands_status(String sHTTP_device_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_devices_device_id_commands_status);
            sSendType = Constants.SEND_TYPE_POST;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: D_devices_device_id_commands_status
     * 2. ClassName : HttpSend
     * 3. Comment   : [DELETE][REST]하위 장치 삭제 제어 명령 실행 (익스클루전)(하위 장치 삭제 가능 상태로 제어 명령을 실행한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void D_devices_device_id_commands_status(String sHTTP_device_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_D_devices_device_id_commands_status);
            sSendType = Constants.SEND_TYPE_DELETE;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_devices_device_id_commands_status
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][REST]하위 장치 추가/삭제 결과 조회 (Polling 용)(하위 장치의 추가/삭제 명령 결과를 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_devices_device_id_commands_status(String sHTTP_device_id, String sHTTP_command_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_devices_device_id_commands_status);
            sSendType = Constants.SEND_TYPE_GET;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            addParameter(alPost, Constants.HTTP_command_id, sHTTP_command_id);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_devices_device_class_device_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][REST]장치 유형 조회(Device Class)(장치 유형 목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_devices_device_class_device_id(String sHTTP_device_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_devices_device_class_device_id);
            sSendType = Constants.SEND_TYPE_GET;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_devices_device_class_device_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][REST]장치 유형 변경(Device Class)(장치의 유형 값을 변경한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_devices_device_class_device_id(String sHTTP_device_id, String sHTTP_device_profile_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_devices_device_class_device_id);
            sSendType = Constants.SEND_TYPE_POST;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            addParameter(alPost, Constants.HTTP_device_profile_id, sHTTP_device_profile_id);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_groups_devices
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][폐기] 장치그룹별 장치 목록 조회(장치그룹별 장치 목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_groups_devices(String sHTTP_dvcgrp_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_groups_devices);
            sSendType = Constants.SEND_TYPE_GET;
            if ( !util.null2string(sHTTP_dvcgrp_id).equals("") ) {
                addParameter(alPost, Constants.HTTP_dvcgrp_id, sHTTP_dvcgrp_id);
            }
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_groups_devices_dvcgrp_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][REST][폐기] 장치그룹 내 장치 추가(선택된 장치들을 그룹에 추가한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_groups_devices_dvcgrp_id(String sHTTP_dvcgrp_id, String sBodyVal) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_groups_devices_dvcgrp_id);
            sSendType = Constants.SEND_TYPE_POST1;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_dvcgrp_id, sHTTP_dvcgrp_id);
            sBody = sBodyVal;
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: D_groups_devices_device_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [DELETE][REST][폐기] 장치그룹 내 장치 삭제(선택된 장치를 그룹에서 삭제한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void D_groups_devices_device_id(String sHTTP_dvcgrp_id, String sHTTP_device_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_D_groups_devices_device_id);
            sSendType = Constants.SEND_TYPE_DELETE;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_dvcgrp_id, sHTTP_dvcgrp_id);
            /** 디바이스아이디 */
            addParameter(alPost, Constants.HTTP_device_id, sHTTP_device_id);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_groups
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][폐기] 장치그룹 조회(장치그룹 목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_groups() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_groups);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_groups
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][폐기] 장치그룹 생성(장치그룹을 생성한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_groups(String sHTTP_dvcgrp_name) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_groups);
            sSendType = Constants.SEND_TYPE_POST;
            //sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            /** 그룹명 */
            addParameter(alPost, Constants.HTTP_dvcgrp_name, sHTTP_dvcgrp_name);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_groups_dvcgrp_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][REST][폐기] 장치그룹 수정(장치그룹의 속성을 수정한다. (그룹명))
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_groups_dvcgrp_id(String sHTTP_dvcgrp_id, String sHTTP_change_dvcgrp_name) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_groups_dvcgrp_id);
            sSendType = Constants.SEND_TYPE_POST;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_dvcgrp_id, sHTTP_dvcgrp_id);
            //            /** 디바이스를 등록할 그룹 ID */
            addParameter(alPost, Constants.HTTP_dvcgrp_id, sHTTP_dvcgrp_id);
            /** 그룹명 */
            addParameter(alPost, Constants.HTTP_change_dvcgrp_name, sHTTP_change_dvcgrp_name);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: D_groups_dvcgrp_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [DELETE][REST][폐기] 장치그룹 삭제(장치그룹을 삭제한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void D_groups_dvcgrp_id(String sHTTP_dvcgrp_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_D_groups_dvcgrp_id);
            sSendType = Constants.SEND_TYPE_DELETE;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_dvcgrp_id, sHTTP_dvcgrp_id);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_devices_partner_device
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST](파트너 제품) 장치 등록((파트너 제품) 장치를 등록하고 device_id와 device_key 등을 할당한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_devices_partner_device() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_devices_partner_device);
            sSendType = Constants.SEND_TYPE_POST;
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_devices_partner_device_ownership
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET](파트너 제품) 장치 유효성 검사 (QR코드)((파트너 제품) 장치의 QR 정보의 유효성을 확인하고, 장치의 소유자가 있는지를 확인한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_devices_partner_device_ownership(String sHTTP_activation_code, String sHTTP_activation_password) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_devices_partner_device_ownership);
            sSendType = Constants.SEND_TYPE_GET;
            addParameter(alPost, Constants.HTTP_activation_code, sHTTP_activation_code);
            addParameter(alPost, Constants.HTTP_activation_password, sHTTP_activation_password);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_devices_device_id_ownership
     * 2. ClassName : HttpSend
     * 3. Comment   : [PUT]기존 디바이스의 비밀번호를 확인하여 일치하면 소유권을 변경 처리한다.
     * 4. Developer : 정백호
     * 5. Created   : 2016. 07.
     * </PRE>
     */
    public void P_devices_device_id_ownership(String sHTTP_device_id, String sHTTP_owner_auth_password) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_devices_device_id_ownership);
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            sSendType = Constants.SEND_TYPE_PUT;
            addParameter(alPost, Constants.HTTP_owner_auth_password, sHTTP_owner_auth_password);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: D_devices_partner_device_device_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [DELETE][REST](파트너 제품) 장치 초기화 또는 삭제((파트너 제품) 등록된 장치의 초기화를 통해 장치를 해지한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void D_devices_partner_device_device_id() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_D_devices_partner_device_device_id);
            sSendType = Constants.SEND_TYPE_DELETE;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_devices_smart_phone
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][폐기] (스마트폰) 장치 등록(위치 서비스를 하기 위해 스마트폰을 (모바일) 장치로 등록한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_devices_smart_phone(String sHTTP_device_name, String sHTTP_os_type, String sHTTP_device_sn) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_devices_smart_phone);
            sSendType = Constants.SEND_TYPE_POST;
            //sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            addParameter(alPost, Constants.HTTP_device_name, sHTTP_device_name);
            addParameter(alPost, Constants.HTTP_os_type, sHTTP_os_type);
            addParameter(alPost, Constants.HTTP_device_sn, sHTTP_device_sn);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_devices_camera
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][폐기] (카메라) 장치 등록(CCTV 카메라를 장치로 등록한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_devices_camera(String sHTTP_camera_id, String sHTTP_camera_password, String sHTTP_url, String sHTTP_port) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_devices_camera);
            sSendType = Constants.SEND_TYPE_POST;
            //sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            addParameter(alPost, Constants.HTTP_camera_id, sHTTP_camera_id);
            addParameter(alPost, Constants.HTTP_camera_password, sHTTP_camera_password);
            addParameter(alPost, Constants.HTTP_url, sHTTP_url);
            addParameter(alPost, Constants.HTTP_port, sHTTP_port);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_devices_demo_device
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][폐기] 장치 직접 등록(직접 장치를 등록한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_devices_demo_device() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_devices_demo_device);
            sSendType = Constants.SEND_TYPE_POST;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_devices_partner_device_dawon
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][폐기] (파트너 제품)장치 등록 - 다원전용([다원전용] 다원 플러그 장치를 등록한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_devices_partner_device_dawon() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_devices_partner_device_dawon);
            sSendType = Constants.SEND_TYPE_POST;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_devices_camera_device_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][REST][폐기] (카메라) 장치 접속정보 변경(CCTV 카메라의 접속정보를 변경한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_devices_camera_device_id(String sHTTP_device_id, String sHTTP_camera_id, String sHTTP_camera_password, String sHTTP_url, String sHTTP_port) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_devices_camera_device_id);
            sSendType = Constants.SEND_TYPE_POST;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            addParameter(alPost, Constants.HTTP_camera_id, sHTTP_camera_id);
            addParameter(alPost, Constants.HTTP_camera_password, sHTTP_camera_password);
            addParameter(alPost, Constants.HTTP_url, sHTTP_url);
            addParameter(alPost, Constants.HTTP_port, sHTTP_port);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_devices_partner_device_subdevice_device_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][REST][폐기] (파트너 제품) 하위 장치 삭제((파트너 제품) GW장치가 하위장치를 삭제할 경우 사용한다)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_devices_partner_device_subdevice_device_id() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_devices_partner_device_subdevice_device_id);
            sSendType = Constants.SEND_TYPE_POST;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: D_devices_childdevice
     * 2. ClassName : HttpSend
     * 3. Comment   : [DELETE][폐기] 하위 장치 즉시삭제(하위 장치를 즉시 삭제한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void D_devices_childdevice() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_D_devices_childdevice);
            sSendType = Constants.SEND_TYPE_DELETE;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    /**
     * <PRE>
     * 1. MethodName: G_devices_nodes
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET]복수 - 노드(커맨드클래스) 마지막 상태 값 조회(복수 노드(커맨드클래스)의 마지막 상태 값을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_devices_nodes(String sHTTP_ids) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_devices_nodes);
            sSendType = Constants.SEND_TYPE_GET;
            addParameter(alPost, Constants.HTTP_ids, sHTTP_ids);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_devices_homehub_status
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET]홈허브 장치 상태 정보 조회(현재 홈그룹에 등록된 홈허브의 상태 정보를 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_devices_homehub_status() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_devices_homehub_status);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_devices_device_id_password
     * 2. ClassName : HttpSend
     * 3. Comment   : [PUT](소유권을 확인할 때 사용하는) 디바이스 비밀번호를 변경한다.)
     * 4. Developer : 정백호
     * 5. Created   : 2016. 06.
     * </PRE>
     */
    public void P_devices_device_id_password(String sHTTP_device_id, String sHTTP_new_owner_auth_password) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_devices_device_id_password);
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_id, sHTTP_device_id);
            sSendType = Constants.SEND_TYPE_PUT;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_user_device_password, sHTTP_user_device_password);
            addParameter(alPost, Constants.HTTP_new_owner_auth_password, sHTTP_new_owner_auth_password);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_devices_warning_nodes
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET](외출 상태시) 경고 필요한 장치 조회((외출 상태시) 경고가 필요한 장치 노드 목록을 조회한다.) 33.15
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_devices_warning_nodes() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_devices_warning_nodes);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_predefined_rules
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET]사전정의 규칙 목록 조회(사전정의 규칙 목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_predefined_rules() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_predefined_rules);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_predefined_rules_pred_rule_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][REST]사전정의 규칙 상세 조회(사전정의 규칙을 상세 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_predefined_rules_pred_rule_id() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_predefined_rules_pred_rule_id);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_predefined_rules_pred_rule_id_devices_pred_item_sequence
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][REST]사전정의 규칙 장치 목록 조회(사전정의 규칙 항목에 해당되는 장치+노드 목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_predefined_rules_pred_rule_id_devices_pred_item_sequence() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_predefined_rules_pred_rule_id_devices_pred_item_sequence);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_rules
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET]홈 규칙 목록 조회(홈의 규칙 목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_rules(String sHTTP_rule_id, String sHTTP_paging_type) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_rules);
            sSendType = Constants.SEND_TYPE_GET;

            addParameter(alPost, Constants.HTTP_rule_id, sHTTP_rule_id);
            addParameter(alPost, Constants.HTTP_paging_type, sHTTP_paging_type);

            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_rules_homegrp_rule_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][REST]홈 규칙 상세 조회(해당 규칙의 정보를 상세 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_rules_homegrp_rule_id(String sHTTP_homegrp_rule_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_rules_homegrp_rule_id);
            sSendType = Constants.SEND_TYPE_GET;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_homegrp_rule_id, sHTTP_homegrp_rule_id);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_rules_homegrp_rule_id_status
     * 2. ClassName : HttpSend
     * 3. Comment   : [PUT][REST]홈 규칙 상태 변경(해당 규칙의 상태를 변경한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_rules_homegrp_rule_id_status(String sHTTP_homegrp_rule_id, String sHTTP_status_code) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_rules_homegrp_rule_id_status);
            sSendType = Constants.SEND_TYPE_PUT;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_homegrp_rule_id, sHTTP_homegrp_rule_id);
            addParameter(alPost, Constants.HTTP_status_code, sHTTP_status_code);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_rules
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST]홈 규칙 등록(규칙을 등록한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_rules(String sBodyVal) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_rules);
            sSendType = Constants.SEND_TYPE_POST1;
            sBody = sBodyVal;
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_rules_homegrp_rule_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [PUT][REST]홈 규칙 수정(해당 규칙을 수정한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_rules_homegrp_rule_id(String sHTTP_homegrp_rule_id, String sBodyVal) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_rules_homegrp_rule_id);
            sSendType = Constants.SEND_TYPE_PUT1;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_homegrp_rule_id, sHTTP_homegrp_rule_id);
            sBody = sBodyVal;
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: D_rules_homegrp_rule_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [DELETE][REST]홈 규칙 삭제(해당 규칙을 삭제한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void D_rules_homegrp_rule_id(String sHTTP_homegrp_rule_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_D_rules_homegrp_rule_id);
            sSendType = Constants.SEND_TYPE_DELETE;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_homegrp_rule_id, sHTTP_homegrp_rule_id);

            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_rules_cmdcls_item_type_code
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][REST]커맨드클래스(CMDCLS) 목록 조회(규칙 trigger, action에서 사용할 CMDCLS별 목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_rules_cmdcls_item_type_code() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_rules_cmdcls_item_type_code);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_rules_mobile_devices
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][폐기] 지오펜싱 - 장치 목록 조회(지오펜싱에서 사용할 모바일 단말(장치) 조회)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_rules_mobile_devices() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_rules_mobile_devices);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_rules_mobile_members
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET]푸쉬 유저 목록 조회(푸쉬액션으로 사용할 유저 조회)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_rules_mobile_members() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_rules_mobile_members);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_rules_item_devices_item_type_code
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][REST]액션 장치의 목록 조회(규칙 아이템(조건,액션)으로 사용할 장치를 조회)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_rules_item_devices_item_type_code(String sHTTP_item_type_code) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_rules_item_devices_item_type_code);
            sSendType = Constants.SEND_TYPE_GET;
            addParameter(alPost, Constants.HTTP_item_type_code, sHTTP_item_type_code);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_predefined_scenes
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][폐기] 사전정의 멀티제어 목록 조회(사전정의 멀티제어 목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_predefined_scenes() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_predefined_scenes);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_predefined_scenes_pred_scene_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][REST][폐기] 사전정의 멀티제어 상세 조회(사전정의 멀티제어 상세를 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_predefined_scenes_pred_scene_id() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_predefined_scenes_pred_scene_id);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_predefined_scenes_pred_scene_id_devices_pred_action_sequence
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][REST][폐기] 사전정의 멀티제어 장치 목록 조회(사전정의 멀티제어 항목에 해당되는 장치+노드 목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_predefined_scenes_pred_scene_id_devices_pred_action_sequence() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_predefined_scenes_pred_scene_id_devices_pred_action_sequence);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_scenes
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][폐기] 홈그룹 멀티제어 목록 조회(홈그룹의 멀티제어 목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_scenes() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_scenes);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_scenes_homegrp_scene_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][REST][폐기] 홈그룹 멀티제어 상세 조회(해당 멀티제어의 정보를 상세 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_scenes_homegrp_scene_id() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_scenes_homegrp_scene_id);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_scenes_homegrp_scene_id_execution
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][REST][폐기] 홈그룹 멀티제어 실행(해당 멀티제어를 실행한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_scenes_homegrp_scene_id_execution() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_scenes_homegrp_scene_id_execution);
            sSendType = Constants.SEND_TYPE_POST;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_scenes
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][폐기] 홈그룹 멀티제어 등록(멀티제어를 등록한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_scenes() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_scenes);
            sSendType = Constants.SEND_TYPE_POST;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_scenes_homegrp_scene_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][REST][폐기] 홈그룹 멀티제어 수정(해당 멀티제어를 수정한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_scenes_homegrp_scene_id() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_scenes_homegrp_scene_id);
            sSendType = Constants.SEND_TYPE_POST;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: D_scenes_homegrp_scene_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [DELETE][REST][폐기] 홈그룹 멀티제어 삭제(해당 멀티제어를 삭제한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void D_scenes_homegrp_scene_id() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_D_scenes_homegrp_scene_id);
            sSendType = Constants.SEND_TYPE_DELETE;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_scenes_cmdcls
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][폐기] 커맨드클래스(CMDCLS) 목록 조회(멀티제어 action에서 사용할 CMDCLS별 목록)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_scenes_cmdcls() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_scenes_cmdcls);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_mode_scenes_mode_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][REST]홈그룹 모드의 멀티제어 상세 조회(해당 홈모드 멀티제어의 정보를 상세 조회한다.) 52.1
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_mode_scenes_mode_id(String sHTTP_mode_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_mode_scenes_mode_id);
            sSendType = Constants.SEND_TYPE_GET;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_mode_id, sHTTP_mode_id);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_mode_scenes_mode_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][REST]홈그룹 모드의 멀티제어 등록&수정(멀티제어를 등록&수정한다.) 52.2
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_mode_scenes_mode_id(String sHTTP_mode_id, String sBodyVal) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_mode_scenes_mode_id);
            sSendType = Constants.SEND_TYPE_POST1;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_mode_id, sHTTP_mode_id);
            sBody = sBodyVal;
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: D_modes_mode_id_rule
     * 2. ClassName : HttpSend
     * 3. Comment   : [DELETE][REST]홈그룹 모드의 규칙 삭제
     * 4. Developer : 정백호
     * 5. Created   : 2016. 06.
     * </PRE>
     */
    public void D_modes_mode_id_rule(String sHTTP_mode_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_D_modes_mode_id_rule);
            sSendType = Constants.SEND_TYPE_DELETE;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_mode_id, sHTTP_mode_id);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_mode_scenes_mode_id_execution
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][REST]홈그룹 모드의 멀티제어 실행(멀티제어를 실행한다.) 52.3
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_mode_scenes_mode_id_execution(String sHTTP_mode_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_mode_scenes_mode_id_execution);
            sSendType = Constants.SEND_TYPE_POST;
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_mode_id, sHTTP_mode_id);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_mobile_device_device_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][REST][폐기] 모바일 장치 조회(등록된 모바일 장치의 현재 상태를 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_mobile_device_device_id() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_mobile_device_device_id);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_mobile_device
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST][폐기] 모바일 장치 등록(모바일 장치를 등록하고 장치 ID를 부여 받는다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_mobile_device() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_mobile_device);
            sSendType = Constants.SEND_TYPE_POST;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_push_token
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST]푸시 토큰 등록/수정(회원의 푸시 토큰을 등록하거나 수정한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_push_token() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_push_token);
            sSendType = Constants.SEND_TYPE_POST;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_common_codes_common_code_list_id
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET][REST][폐기] 공통 코드 목록 조회(common_code_list_id 로 해당 공통코드 목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_common_codes_common_code_list_id() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_common_codes_common_code_list_id);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_app_version
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET]앱 버전 정보 조회(서비스 이용이 가능한 앱 버전 정보를 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_app_version(String sHTTP_os_type, String sHTTP_store_code, String sHTTP_app_version, String sHTTP_service_id) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_app_version);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            addParameter(alPost, Constants.HTTP_os_type, sHTTP_os_type);
            addParameter(alPost, Constants.HTTP_store_code, sHTTP_store_code);
            addParameter(alPost, Constants.HTTP_app_version, sHTTP_app_version);
            addParameter(alPost, Constants.HTTP_service_id, sHTTP_service_id);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_common_weather_location_codes
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET]야후날씨 지역코드 목록 조회(야후 날씨에 사용할 지역코드목록을 조회한다.)
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void G_common_weather_location_codes() {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_common_weather_location_codes);
            sSendType = Constants.SEND_TYPE_GET;
            //            /** 이름 */
            //            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_member_id, sHTTP_member_id);
            //            /** 이름 */
            //            addParameter(alPost, Constants.HTTP_, sHTTP_);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: P_member_push_noti
     * 2. ClassName : HttpSend
     * 3. Comment   : [POST]알림 수신 여부 설정(알림 수신 여부를 설정 한다. (예 : 홈모드가 바뀔 때, 집이 빌 때))
     * 4. Developer : 최진오
     * 5. Created   : 2015. 10.
     * </PRE>
     */
    public void P_member_push_noti(String sHTTP_push_type_mode_chg_yn, String sHTTP_push_type_prsnc_chg_yn) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_P_member_push_noti);
            sSendType = Constants.SEND_TYPE_PUT;
            /** 이메일 ID */
            addParameter(alPost, Constants.HTTP_push_type_mode_chg_yn, sHTTP_push_type_mode_chg_yn);
            addParameter(alPost, Constants.HTTP_push_type_prsnc_chg_yn, sHTTP_push_type_prsnc_chg_yn);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void G_camera_move(String sUrlVal, String sHTTP_camera_move_ctl) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sSendType = Constants.SEND_TYPE_GET;
            sUrl = util.convGetRestReplace(sUrlVal, Constants.HTTP_camera_move_ctl, sHTTP_camera_move_ctl);
            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * <PRE>
     * 1. MethodName: G_devices_mf_id_model_id_sn
     * 2. ClassName : HttpSend
     * 3. Comment   : [GET] (등록 진행하기 전) 해당 디바이스의 기 등록여부를 조회한다.
     * 4. Developer : 정백호
     * 5. Created   : 2016. 07.
     * </PRE>
     */
    public void G_devices_mf_id_model_id_sn(String sHTTP_mf_id, String sHTTP_model_id, String sHTTP_sn) {

        String sUrl = "";
        String sInterface_Id = "";
        String sSendType = "";
        String sBody = "";
        String sFileParamName = "";
        String sFilePath = "";
        ArrayList<HashMap<String, Object>> alPost = new ArrayList<HashMap<String, Object>>();
        ArrayList<String> alFilePath = new ArrayList<String>();
        try {
            sInterface_Id = util.getString(context, R.string.API_VERSION) + util.getString(context, R.string.SEND_G_devices_mf_id_model_id_sn);
            sSendType = Constants.SEND_TYPE_GET;

            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_mf_id, sHTTP_mf_id);
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_model_id, sHTTP_model_id);
            sInterface_Id = util.convGetRestReplace(sInterface_Id, Constants.HTTP_device_sn, sHTTP_sn);

            setHttp(sUrl, sInterface_Id, sSendType, alPost, sBody, sFileParamName, sFilePath, alFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    void setHttp(String sUrl, String sInterface_Id, String sSendType, ArrayList<HashMap<String, Object>> alPost, String sBody, String sFileParamName, String sFilePath, ArrayList<String> alFilePath) {

        try {
            String sUrlVal = "";
            String sUriVal = "";
            String sSendTypeVal = "";
            if ( sUrl.equals("") ) {
                sUrlVal = appConfig.getUrl();
            } else {
                sUrlVal = sUrl;
            }

            String sParam = util.convGetParam(alPost);
            if ( sSendType.equals(Constants.SEND_TYPE_POST) ) {
                sUriVal = sUrlVal + sInterface_Id;
                sSendTypeVal = CustomRequest.HTTP_METHOD_POST;
                CustomRequest customRequest = new CustomRequest(bDialog, sSendTypeVal, sUriVal, appConfig.getAuth_Token(), alPost, CustomRequest.SEND_METHOD);
                executeRequest(customRequest);
            } else if ( sSendType.equals(Constants.SEND_TYPE_POST1) ) {
                sUriVal = sUrlVal + sInterface_Id;
                sSendTypeVal = CustomRequest.HTTP_METHOD_POST;
                CustomRequest customRequest = new CustomRequest(bDialog, sSendTypeVal, sUriVal, appConfig.getAuth_Token(), sBody, CustomRequest.SEND_METHOD);
                executeRequest(customRequest);
            } else if ( sSendType.equals(Constants.SEND_TYPE_MULTIPART) ) {
                sUriVal = sUrlVal + sInterface_Id;
                sSendTypeVal = CustomRequest.HTTP_METHOD_MULTIPART;
                CustomRequest customRequest = new CustomRequest(bDialog, sSendTypeVal, sUriVal, appConfig.getAuth_Token(), alPost, sFileParamName, sFilePath, CustomRequest.SEND_METHOD);
                executeRequest(customRequest);
            } else if ( sSendType.equals(Constants.SEND_TYPE_MULTIPART1) ) {
                sUriVal = sUrlVal + sInterface_Id;
                sSendTypeVal = CustomRequest.HTTP_METHOD_MULTIPART;
                CustomRequest customRequest = new CustomRequest(bDialog, sSendTypeVal, sUriVal, appConfig.getAuth_Token(), alPost, sFileParamName, alFilePath, CustomRequest.SEND_METHOD);
                executeRequest(customRequest);
            } else if ( sSendType.equals(Constants.SEND_TYPE_DELETE) ) {
                sUriVal = sUrlVal + sInterface_Id + sParam;
                sSendTypeVal = CustomRequest.HTTP_METHOD_DELETE;
                CustomRequest customRequest = new CustomRequest(bDialog, sSendTypeVal, sUriVal, appConfig.getAuth_Token(), "", CustomRequest.SEND_METHOD);
                executeRequest(customRequest);
                //            } else if ( sSendType.equals(Constants.SEND_TYPE_DELETE1) ) {
                //                sUriVal = sUrlVal + sInterface_Id + sBody;
                //                sSendTypeVal = CustomRequest.HTTP_METHOD_DELETE;
                //                CustomRequest customRequest = new CustomRequest(bDialog, sSendTypeVal, sUriVal, appConfig.getAuth_Token(), "", CustomRequest.SEND_METHOD);
                //                executeRequest(customRequest);
            } else if ( sSendType.equals(Constants.SEND_TYPE_GET) ) {
                sUriVal = sUrlVal + sInterface_Id + sParam;
                sSendTypeVal = CustomRequest.HTTP_METHOD_GET;
                CustomRequest customRequest = new CustomRequest(bDialog, sSendTypeVal, sUriVal, appConfig.getAuth_Token(), "", CustomRequest.SEND_METHOD);
                executeRequest(customRequest);
            } else if ( sSendType.equals(Constants.SEND_TYPE_PUT) ) {
                sUriVal = sUrlVal + sInterface_Id + sParam;
                sSendTypeVal = CustomRequest.HTTP_METHOD_PUT;
                CustomRequest customRequest = new CustomRequest(bDialog, sSendTypeVal, sUriVal, appConfig.getAuth_Token(), alPost, CustomRequest.SEND_METHOD);
                executeRequest(customRequest);
            } else if ( sSendType.equals(Constants.SEND_TYPE_PUT1) ) {
                sUriVal = sUrlVal + sInterface_Id + sParam;
                sSendTypeVal = CustomRequest.HTTP_METHOD_PUT;
                CustomRequest customRequest = new CustomRequest(bDialog, sSendTypeVal, sUriVal, appConfig.getAuth_Token(), sBody, CustomRequest.SEND_METHOD);
                executeRequest(customRequest);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    void addParameter(List<HashMap<String, Object>> paramListPost, String parameterName, String parameterValue) {

        if ( parameterName == null ) {
            return;
        }
        HashMap<String, Object> hmTemp = new HashMap<String, Object>();
        if ( parameterValue == null ) {
            hmTemp.put(parameterName, "");
        } else {
            Dlog.v(parameterName + ": " + parameterValue);
            hmTemp.put(parameterName, parameterValue);
        }
        paramListPost.add(hmTemp);
    }
    //    private void get(String uri) {
    //
    //        CustomRequest customRequest = new CustomRequest(bDialog, CustomRequest.HTTP_METHOD_GET, uri, appConfig.getAuth_Token(), "", CustomRequest.SEND_METHOD);
    //        executeRequest(customRequest);
    //    }
    //    private void get(String uri, String authorization) {
    //
    //        CustomRequest customRequest = new CustomRequest(bDialog, CustomRequest.HTTP_METHOD_GET, uri, authorization, "", CustomRequest.SEND_METHOD);
    //        executeRequest(customRequest);
    //    }
    //    private void put(String uri, ArrayList<HashMap<String, Object>> alPost, String authorization) {
    //
    //        CustomRequest customRequest = new CustomRequest(bDialog, CustomRequest.HTTP_METHOD_PUT, uri, authorization, alPost, CustomRequest.SEND_METHOD);
    //        executeRequest(customRequest);
    //    }
    //    private void post(String uri, ArrayList<HashMap<String, Object>> alPost) {
    //
    //        CustomRequest customRequest = new CustomRequest(bDialog, CustomRequest.HTTP_METHOD_POST, uri, appConfig.getAuth_Token(), alPost, CustomRequest.SEND_METHOD);
    //        executeRequest(customRequest);
    //    }
    //    private void post(String uri, String sBody) {
    //
    //        CustomRequest customRequest = new CustomRequest(bDialog, CustomRequest.HTTP_METHOD_POST, uri, appConfig.getAuth_Token(), sBody, CustomRequest.SEND_METHOD);
    //        executeRequest(customRequest);
    //    }
    //    private void post(String uri, ArrayList<HashMap<String, Object>> alPost, String authorization) {
    //
    //        CustomRequest customRequest = new CustomRequest(bDialog, CustomRequest.HTTP_METHOD_POST, uri, authorization, alPost, CustomRequest.SEND_METHOD);
    //        executeRequest(customRequest);
    //    }
    //    private void post(String uri, ArrayList<HashMap<String, Object>> alPost, String authorization, String sFileParamName, String sFilePath) {
    //
    //        CustomRequest customRequest = new CustomRequest(bDialog, CustomRequest.HTTP_METHOD_POST, uri, authorization, alPost, sFileParamName, sFilePath, CustomRequest.SEND_METHOD);
    //        executeRequest(customRequest);
    //    }
    //    private void delete(String uri, ArrayList<HashMap<String, Object>> alPost) {
    //
    //        CustomRequest customRequest = new CustomRequest(bDialog, CustomRequest.HTTP_METHOD_DELETE, uri, appConfig.getAuth_Token(), alPost, CustomRequest.SEND_METHOD);
    //        executeRequest(customRequest);
    //    }
    //    private void delete(String uri, String sBody) {
    //
    //        CustomRequest customRequest = new CustomRequest(bDialog, CustomRequest.HTTP_METHOD_DELETE, uri, appConfig.getAuth_Token(), sBody, CustomRequest.SEND_METHOD);
    //        executeRequest(customRequest);
    //    }
    //    private void delete(String uri, ArrayList<HashMap<String, Object>> alPost, String authorization) {
    //
    //        CustomRequest customRequest = new CustomRequest(bDialog, CustomRequest.HTTP_METHOD_DELETE, uri, authorization, alPost, CustomRequest.SEND_METHOD);
    //        executeRequest(customRequest);
    //    }
    //    private void delete(String uri, ArrayList<HashMap<String, Object>> alPost, String authorization, String sFileParamName, String sFilePath) {
    //
    //        CustomRequest customRequest = new CustomRequest(bDialog, CustomRequest.HTTP_METHOD_DELETE, uri, authorization, alPost, sFileParamName, sFilePath, CustomRequest.SEND_METHOD);
    //        executeRequest(customRequest);
    //    }

    private OnDataSendToReslut _task_resulted_event;
    private Dialog             dialog;
    private void executeRequest(CustomRequest customRequest) {

        if ( !bDialog ) {
            if ( dialog != null ) {
                dialog.dismiss();
                dialog = null;
            }
        } else {
            if ( dialog != null ) {
                dialog.cancel();
                dialog = null;
            }
            if (bDialog) {
                dialog = new Dialog(context, R.style.NTLES_Dialog1);
            } else {
                dialog = new Dialog(context, R.style.NTLES_Dialog2);
            }
            dialog.addContentView(new ProgressBar(context, null, android.R.attr.progressBarStyleInverse), new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
            dialog.show();
        }
        AsyncTask<CustomRequest, Integer, Response[]> task = null;
        try {
            task = new HttpTask(context);
            ((HttpTask) task).setOnTaskFinishedEvent(new OnTaskExecutionFinished() {
                @Override public void OnTaskFihishedEvent(Response[] result) {

                    try {
                        if ( dialog != null && dialog.isShowing()) {
                            dialog.dismiss();
                            dialog = null;
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                    if ( _task_resulted_event != null ) {
                        _task_resulted_event.resultResponse(result != null ? result[0] : null);
                    }
                }
            });
            task.execute(customRequest);
        } catch (RequestUnsuccessfulException e) {
            String msg1 = "Unable to execute request";
            Dlog.w(msg1, e);
            _task_resulted_event.resultResponse(ResponseHelper.writeException(msg1, e));
        } catch (Exception ex) {
            ex.printStackTrace();
            String msg1 = "Unable to execute request";
            Dlog.w(msg1, ex);
            _task_resulted_event.resultResponse(ResponseHelper.writeException(msg1, ex));
        }
    }

    public void setOnDataSendToReslutEvent(OnDataSendToReslut _event) {

        if ( _event != null ) {
            this._task_resulted_event = _event;
        }
    }
}
