Eina_Bool res = EINA_FALSE;
Ecore_Window win = 0;
uint32_t hint_id;
+ std::shared_ptr<auxHintEventItem> hint = NULL;
const char *hint_key, *hint_val;
res = eldbus_message_error_get(msg, &name, &text);
res = eldbus_message_arguments_get(msg, "uuss", &win, &hint_id, &hint_key, &hint_val);
EINA_SAFETY_ON_FALSE_GOTO(res, finish);
- runner->insertEventQueue(win, E_TC_EVENT_TYPE_AUX_HINT_CHANGED);
+ hint = std::make_shared<auxHintEventItem>(win, E_TC_EVENT_TYPE_AUX_HINT_CHANGED, hint_id, hint_key, hint_val);
+ EINA_SAFETY_ON_NULL_GOTO(hint, finish);
+
+ runner->insertEventQueue(hint);
finish:
if ((name) || (text))
E_TC_Event_Type type;
};
+class auxHintEventItem : public eventItem
+{
+public:
+ auxHintEventItem() = delete;
+ auxHintEventItem (Ecore_Window win, E_TC_Event_Type type, int id, const char *hint, const char *val) :
+ eventItem(win, type),
+ id(id),
+ hint(std::string(hint)),
+ val(std::string(val))
+ {
+ }
+ ~auxHintEventItem()
+ {
+ }
+
+ Eina_Bool isSameID(int id) { return id == this->id; }
+ Eina_Bool isSameHint(std::string hint) { return !strncmp(hint.c_str(), this->hint.c_str(), hint.size()); }
+ Eina_Bool isSameVal(std::string val) { return val == this->val; }
+ int getID() { return this->id; }
+ std::string getHint() { return this->hint; }
+ std::string getVal() { return this->val; }
+
+private:
+ int id;
+ std::string hint;
+ std::string val;
+};
+
class etRunner
{
private: