*/
std::string getDescription() const;
+ /**
+ * @copydoc UiObject::getImgSrc()
+ */
+ std::string getImgSrc() const;
+
/**
* @copydoc UiObject::isCheckable()
*/
std::string mToolkitName;
std::string mInterface;
std::string mDescription;
+ std::string mImgSrc;
Rect<int> mScreenBoundingBox;
Rect<int> mWindowBoundingBox;
Rect<int> mTextMinBoundingRect;
*/
std::string getDescription() const;
+ /**
+ * @brief Gets object's image source.
+ *
+ * @return string
+ *
+ * @since_tizen 10.0
+ */
+ std::string getImgSrc() const;
+
/**
* @brief Gets object's checkable property.
*
*/
UiSelector *description(std::string description);
+ /**
+ * @brief Sets the search criteria to match the object's image source.
+ *
+ * @param[in] imgSrc object image source
+ *
+ * @return UiSelector class instance
+ *
+ * @since_tizen 10.0
+ */
+ UiSelector *imgSrc(std::string imgSrc);
+
public:
std::string mId;
std::string mAutomationId;
std::string mXPath;
std::string mOcrText;
std::string mDescription;
+ std::string mImgSrc;
bool mMatchId;
bool mMatchAutomationId;
bool mMatchOcrText;
bool mMatchGeometry;
bool mMatchDescription;
+ bool mMatchImgSrc;
bool mMatchChecked;
bool mMatchCheckable;
}
AccessibleNode::AccessibleNode()
-: mText{""}, mOcrText{""}, mPkg{""}, mRole{""}, mId{""}, mAutomationId{""}, mType{""}, mStyle{""}, mXPath{""}, mToolkitName{""}, mInterface{""}, mDescription{""},
+: mText{""}, mOcrText{""}, mPkg{""}, mRole{""}, mId{""}, mAutomationId{""}, mType{""}, mStyle{""}, mXPath{""}, mToolkitName{""}, mInterface{""}, mDescription{""}, mImgSrc{""},
mScreenBoundingBox{0,0,0,0}, mWindowBoundingBox{0,0,0,0}, mTextMinBoundingRect{0,0,0,0}, mSupportingIfaces(0), mFeatureProperty(0), mPid(0), mWindowAngle(0), mTargetAngle(0), mMinValue{0.0}, mMaxValue{0.0}, mValue{0.0}, mIncrement{0.0}, mValid{true}, mLock{}
{
}
ss << "\"mPkg\":\"" << this->mPkg << "\", ";
ss << "\"mType\":\"" << this->mType << "\", ";
ss << "\"mStyle\":\"" << this->mStyle << "\", ";
+ ss << "\"mImgSrc\":\"" << this->mImgSrc << "\", ";
ss << "}";
return ss.str();
return mDescription;
}
+std::string AccessibleNode::getImgSrc() const
+{
+ return mImgSrc;
+}
+
bool AccessibleNode::isCheckable() const
{
return hasFeatureProperty(NodeFeatureProperties::CHECKABLE);
element.append_attribute("name") = node->getText().c_str();
element.append_attribute("id") = node->getId().c_str();
element.append_attribute("automationid") = node->getAutomationId().c_str();
+ element.append_attribute("imgSrc") = node->getImgSrc().c_str();
mXNodeMap[node->getId()] = node;
if (!t) t = (char*)g_hash_table_lookup(attributes, "class");
char *s = (char*)g_hash_table_lookup(attributes, "style");
char *a = (char*)g_hash_table_lookup(attributes, "automationId");
+ char *i = (char*)g_hash_table_lookup(attributes, "imgSrc");
if (t) mType = std::string(t);
else {
}
if (s) mStyle = std::string(s);
if (a) mAutomationId = std::string(a);
+ if (i) mImgSrc = std::string(i);
g_hash_table_unref(attributes);
}
if (!t) t = (char *)g_hash_table_lookup(attributes, "class");
char *s = (char *)g_hash_table_lookup(attributes, "style");
char *a = (char *)g_hash_table_lookup(attributes, "automationId");
+ char *i = (char*)g_hash_table_lookup(attributes, "imgSrc");
if (t) mType = std::string(t);
else mType = mRole;
if (s) mStyle = std::string(s);
if (a) mAutomationId = std::string(a);
+ if (i) mImgSrc = std::string(i);
}
}
if (ni->states) {
node->updateUniqueId();
if (checkCriteria(selector->mId, node->getId(), 0)) return false;
}
- if (selector->mMatchType || selector->mMatchAutomationId || selector->mMatchStyle) {
+ if (selector->mMatchType || selector->mMatchAutomationId || selector->mMatchStyle || selector->mMatchImgSrc) {
node->updateAttributes();
if (selector->mMatchAutomationId && checkCriteria(selector->mAutomationId, node->getAutomationId(), 0)) return false;
if (selector->mMatchType && checkCriteria(selector->mType, node->getType(), 0)) return false;
if (selector->mMatchStyle && checkCriteria(selector->mStyle, node->getStyle(), 0)) return false;
+ if (selector->mMatchImgSrc && checkCriteria(selector->mImgSrc, node->getImgSrc(), 0)) return false;
}
if (selector->mMatchPkg) {
node->updateApplication();
return mNode->getDescription();
}
+std::string UiObject::getImgSrc() const
+{
+ return mNode->getImgSrc();
+}
+
bool UiObject::setValue(double value)
{
return mNode->setValue(value);
using namespace Aurum;
UiSelector::UiSelector()
-: mId{}, mAutomationId{}, mRole{}, mText{}, mPkg{}, mType{}, mStyle{}, mTextPartialMatch{}, mXPath{}, mOcrText{}, mDescription{},
+: mId{}, mAutomationId{}, mRole{}, mText{}, mPkg{}, mType{}, mStyle{}, mTextPartialMatch{}, mXPath{}, mOcrText{}, mDescription{}, mImgSrc{},
mMatchId{}, mMatchAutomationId{}, mMatchRole{}, mMatchText{}, mMatchPkg{}, mMatchType{}, mMatchStyle{},
- mMatchTextPartialMatch{}, mMatchXPath{}, mMatchOcrText{}, mMatchGeometry{}, mMatchDescription{}, mMatchChecked{}, mMatchCheckable{}, mMatchClickable{}, mMatchEnabled{},
+ mMatchTextPartialMatch{}, mMatchXPath{}, mMatchOcrText{}, mMatchGeometry{}, mMatchDescription{}, mMatchImgSrc{}, mMatchChecked{}, mMatchCheckable{}, mMatchClickable{}, mMatchEnabled{},
mMatchFocused{}, mMatchFocusable{}, mMatchScrollable{}, mMatchSelected{}, mMatchShowing{}, mMatchActive{}, mMatchVisible{},
mMatchSelectable{}, mMatchHighlightable{}, mMinDepth{}, mMaxDepth{}, mIschecked{}, mIscheckable{}, mIsclickable{}, mIsenabled{},
mIsfocused{}, mIsfocusable{}, mIsscrollable{}, mIsselected{}, mIsshowing{}, mIsactive{}, mIsvisible{},
if(!this->mPkg.empty()) ss << "\"mPkg\":\"" << this->mPkg << "\", ";
if(!this->mType.empty()) ss << "\"mType\":\"" << this->mType << "\", ";
if(!this->mStyle.empty()) ss << "\"mStyle\":\"" << this->mStyle << "\", ";
+ if(!this->mImgSrc.empty()) ss << "\"mImgSrc\":\"" << this->mImgSrc << "\", ";
if(this->mMatchGeometry) ss << "\"mGeometry\":\"" << this->mGeometry.mTopLeft.x << "//" << this->mGeometry.mTopLeft.y << "//" << this->mGeometry.width() << "//" << this->mGeometry.height() << "\", ";
if(this->mMatchId) ss << "\"mMatchId\":\"" << ((this->mMatchId)?"true":"false") << "\", ";
if(this->mMatchAutomationId) ss << "\"mMatchAutomationId\":\"" << ((this->mMatchAutomationId)?"true":"false") << "\", ";
if(this->mMatchStyle) ss << "\"mMatchStyle\":\"" << ((this->mMatchStyle)?"true":"false" )<< "\", ";
if(this->mMatchGeometry) ss << "\"mMatchGeometry\":\"" << ((this->mMatchGeometry)?"true":"false" )<< "\", ";
if(this->mMatchDescription) ss << "\"mMatchDescription\":\"" << ((this->mMatchDescription)?"true":"false") << "\", ";
+ if(this->mMatchImgSrc) ss << "\"mMatchImgSrc\":\"" << ((this->mMatchImgSrc)?"true":"false") << "\", ";
if(this->mMinDepth) ss << "\"mMinDepth\":\"" << this->mMinDepth << "\", ";
if(this->mMaxDepth) ss << "\"mMaxDepth\":\"" << this->mMaxDepth << "\", ";
if(this->mMatchChecked) ss << "\"mMatchChecked\":\"" << ((this->mMatchChecked)?"true":"false") << "\", ";
this->mMatchDescription = true;
return this;
}
+
+UiSelector *UiSelector::imgSrc(std::string imgSrc)
+{
+ this->mImgSrc = imgSrc;
+ this->mMatchImgSrc = true;
+ return this;
+}
root->set_interface(obj->getInterface());
root->set_description(obj->getDescription());
+ root->set_imgsrc(obj->getImgSrc());
for( auto && childNode : node->mChildren) {
::aurum::Element *child = root->add_child();
if(mRequest->reqIsselectable_case()) sel->isSelectable(mRequest->isselectable());
if(mRequest->reqIshighlightable_case()) sel->isHighlightable(mRequest->ishighlightable());
if(mRequest->reqDescription_case()) sel->description(mRequest->description());
+ if(mRequest->reqImgSrc_case()) sel->imgSrc(mRequest->imgsrc());
return sel;
}
elm->set_interface(obj->getInterface());
elm->set_description(obj->getDescription());
+ elm->set_imgsrc(obj->getImgSrc());
mResponse->set_status(::aurum::RspStatus::OK);
} else {
if(mRequest->reqIsselectable_case()) sel->isSelectable(mRequest->isselectable());
if(mRequest->reqIshighlightable_case()) sel->isHighlightable(mRequest->ishighlightable());
if(mRequest->reqDescription_case()) sel->description(mRequest->description());
-
+ if(mRequest->reqImgSrc_case()) sel->imgSrc(mRequest->imgsrc());
return std::vector<std::shared_ptr<UiSelector>>{sel};
}
elm->set_interface(obj->getInterface());
elm->set_description(obj->getDescription());
+ elm->set_imgsrc(obj->getImgSrc());
}
mResponse->set_status(::aurum::RspStatus::OK);
} else {
elm->set_interface(obj->getInterface());
elm->set_description(obj->getDescription());
+ elm->set_imgsrc(obj->getImgSrc());
mResponse->set_status(::aurum::RspStatus::OK);
} else {
elm->set_interface(obj->getInterface());
elm->set_description(obj->getDescription());
+ elm->set_imgsrc(obj->getImgSrc());
mResponse->set_status(::aurum::RspStatus::OK);
} else {
elm->set_interface(obj->getInterface());
elm->set_description(obj->getDescription());
+ elm->set_imgsrc(obj->getImgSrc());
mResponse->set_status(::aurum::RspStatus::OK);
} else {
elm->set_interface(obj->getInterface());
elm->set_description(obj->getDescription());
+ elm->set_imgsrc(obj->getImgSrc());
mResponse->set_status(::aurum::RspStatus::OK);
} else {
string interface = 33;
string description = 34;
+ string imgSrc = 35;
}
message Point {
string description = 26;
}
+ oneof reqImgSrc {
+ string imgSrc = 28;
+ }
+
repeated ReqFindElement children = 27;
}
string description = 26;
}
+ oneof reqImgSrc {
+ string imgSrc = 28;
+ }
+
repeated ReqFindElements children = 27;
}