| 88 | } |
| 89 | |
| 90 | bool MultiIconPlugin::getTopic(const String& topic, JsonObject& value) const |
| 91 | { |
| 92 | bool isSuccessful = false; |
| 93 | |
| 94 | /* Single slot requested? */ |
| 95 | if (true == topic.startsWith(String(TOPIC_SLOT) + "/")) |
| 96 | { |
| 97 | uint8_t slotId = _MultiIconPlugin::View::MAX_ICON_SLOTS; |
| 98 | bool status = getSlotIdFromTopic(slotId, topic); |
| 99 | |
| 100 | if ((true == status) && |
| 101 | (_MultiIconPlugin::View::MAX_ICON_SLOTS > slotId)) |
| 102 | { |
| 103 | value["fileId"] = getIconFileId(slotId); |
| 104 | |
| 105 | isSuccessful = true; |
| 106 | } |
| 107 | } |
| 108 | /* All slots requested? */ |
| 109 | else if (true == topic.equals(TOPIC_SLOTS)) |
| 110 | { |
| 111 | getConfiguration(value); |
| 112 | isSuccessful = true; |
| 113 | } |
| 114 | else |
| 115 | { |
| 116 | ; |
| 117 | } |
| 118 | |
| 119 | return isSuccessful; |
| 120 | } |
| 121 | |
| 122 | bool MultiIconPlugin::setTopic(const String& topic, const JsonObjectConst& value) |
| 123 | { |
nothing calls this directly
no test coverage detected