mirror of
https://github.com/openharmony/accessibility.git
synced 2026-08-24 22:11:28 -04:00
add pagePath
Signed-off-by: yichengzhao <yichengzhao1@huawei.com> Change-Id: I76cd548c8e8dff7d673ad6e8a45e793e2626d9a8
This commit is contained in:
@@ -109,6 +109,7 @@ bool AccessibilityElementInfoParcel::ReadFromParcel(Parcel &parcel)
|
||||
READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Int32, parcel, inputType_);
|
||||
READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, validElement_);
|
||||
READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, inspectorKey_);
|
||||
READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, pagePath_);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -175,6 +176,7 @@ bool AccessibilityElementInfoParcel::Marshalling(Parcel &parcel) const
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Int32, parcel, inputType_);
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, validElement_);
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, inspectorKey_);
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, pagePath_);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -378,6 +378,18 @@ const std::string &AccessibilityElementInfo::GetInspectorKey() const
|
||||
return inspectorKey_;
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetPagePath(const std::string &path)
|
||||
{
|
||||
HILOG_DEBUG("pagePath_[%{public}s]", path.c_str());
|
||||
pagePath_ = path;
|
||||
}
|
||||
|
||||
const std::string &AccessibilityElementInfo::GetPagePath() const
|
||||
{
|
||||
HILOG_DEBUG("pagePath_[%{public}s]", pagePath_.c_str());
|
||||
return pagePath_;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::IsValidElement() const
|
||||
{
|
||||
HILOG_DEBUG("validElement_[%{public}d]", validElement_);
|
||||
|
||||
@@ -1212,6 +1212,20 @@ public:
|
||||
*/
|
||||
const std::string &GetInspectorKey() const;
|
||||
|
||||
/**
|
||||
* @brief Set the path of page.
|
||||
* @param path The unique identification of one page.
|
||||
* @sysCap Accessibility
|
||||
*/
|
||||
void SetPagePath(const std::string &path);
|
||||
|
||||
/**
|
||||
* @brief Get the path of page
|
||||
* @return Page path
|
||||
* @sysCap Accessibility
|
||||
*/
|
||||
const std::string &GetPagePath() const;
|
||||
|
||||
/**
|
||||
* @brief Set page id
|
||||
* @param pageId page id.
|
||||
@@ -1310,6 +1324,7 @@ protected:
|
||||
std::string contentDescription_ = "";
|
||||
std::string resourceName_ = "";
|
||||
std::string inspectorKey_ = "";
|
||||
std::string pagePath_ = "";
|
||||
std::vector<int32_t> childNodeIds_;
|
||||
int32_t childCount_ = 0;
|
||||
std::vector<AccessibleAction> operations_;
|
||||
|
||||
Reference in New Issue
Block a user