[Accessibility-ia2] new method(s) for fetching attributes

Pete Brunet pete at a11ysoft.com
Thu Oct 22 09:04:16 PDT 2009


Alex posted the following:

Additionally I would like to say about third problem which also concerns
to IA2 and ATK both. It should be nice to have a new method to deal with
object attributes and text attributes, i.e a method to get attribute
value by its name. It should help both client and server sides to deal
with attributes (it's not needed to calculate attributes all together
and then parse them from string) and improve performance as well. If AT
wants to get attributes all together but they don't want to parse a
string then we could introduce attributes collection object like we have
for relations in IA2.

We can add the following to IA2::attribute and IAText::attribute:
  HRESULT ([in] BSTR name, [out, retval] BSTR *value)

Is an array of attributes also needed or should we stick with the
existing method which returns a multi-attribute string and thus the
required parsing?

HRESULT attributes ([out, size_is(,*nAttributes)] BSTR **attributes,
[out, retval] long *nAttributes)

Notes:
1) The BSTRs returned would be in the form "name:value".  Is there any
preference for returning a struct of two BSTRs, one each for the name
and value?
2) The server allocates the array of BSTRs and the client frees the
BSTRs and the array.

If we add an array, I assume we'd remove the existing method which
returns a string.

-- 
*Pete Brunet*
                                                                
a11ysoft - Accessibility Architecture and Development
(512) 238-6967 (work), (512) 689-4155 (cell)
Skype: pete.brunet
IM: ptbrunet (AOL, Google), ptbrunet at live.com (MSN)
http://www.a11ysoft.com/about/
Ionosphere: WS4G
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux-foundation.org/pipermail/accessibility-ia2/attachments/20091022/54b6c4d9/attachment.htm 


More information about the Accessibility-ia2 mailing list