All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.digitaldan.harmony.messages.ConfigMessage Maven / Gradle / Ivy

The newest version!
package com.digitaldan.harmony.messages;

import java.util.HashMap;
import java.util.Map;

import com.digitaldan.harmony.config.HarmonyConfig;
import com.google.gson.annotations.SerializedName;

public class ConfigMessage {
    public static final String MIME_TYPE = "vnd.logitech.harmony/vnd.logitech.harmony.engine?config";

    public static class ConfigRequestMessage extends RequestMessage {

        public ConfigRequestMessage() {
            super(MIME_TYPE);
        }

        @Override
        public Map getParams() {
            return new HashMap<>();
        }

    }

    public static class ConfigResponseMessage extends ResponseMessage {

        @SerializedName("data")
        private HarmonyConfig harmonyConfig;

        public ConfigResponseMessage(int code, String id, String msg, HarmonyConfig harmonyConfig) {
            super(code, id, msg);
            this.harmonyConfig = harmonyConfig;
        }

        public HarmonyConfig getHarmonyConfig() {
            return harmonyConfig;
        }

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy