I don't mind. It doesn't sound like that extra method complicates things a lot. But I agree that's not friendly to new implementations. ALex.
On Tue, Mar 13, 2012 at 10:49 PM, James Teh <[email protected]> wrote: > Hi. > Personally, I don't mind which. However, one issue to consider is that > having two methods increases the work (and potential for error) for server > implementers. In contrast, retrieving a single relation via an array method, > while perhaps a little less elegant, isn't particularly difficult for > clients. > > Jamie > > > On 14/03/2012 12:39 AM, Pete Brunet wrote: >> >> In both cases there has been agreement on the first method (which will >> be used the vast majority of the time): >> >> // Fetch one target, even if there is more than one. >> HRESULT IAccessible2_2::relationTargetOfType ( >> [in] BSTR type, >> [out, retvalue] IUnknown **target ) >> >> But there have been two suggestions for a companion method to get more >> than one relation: >> >> // Fetch all targets >> HRESULT IAccessible2_2::relationTargetsOfType ( >> [in] BSTR type, >> [out, size_is(,*nTargets)] IUnknown ***targets, >> [out, retval] long *nTargets ) // # targets returned >> >> or >> >> // Fetch either a specified number of targets or >> // all targets depending on the maxTargets parameter. >> // >> // maxTargets will typically be 1 or 0. >> // If maxTargets is 0 all targets will be returned. >> HRESULT IAccessible2_2::relationTargetsOfType ( >> [in] BSTR type, >> [in] long maxTargets, >> [out, size_is(,*nTargets)] IUnknown ***targets, >> [out, retval] long *nTargets ) // # targets returned >> >> Note: In both cases the server allocates the array. The size of the >> array is conveyed via nTargets. >> >> Pete > > > -- > James Teh > Director, NV Access Limited > Email: [email protected] > Web site: http://www.nvaccess.org/ > Phone: +61 7 5667 8372 > _______________________________________________ > Accessibility-ia2 mailing list > [email protected] > https://lists.linuxfoundation.org/mailman/listinfo/accessibility-ia2 _______________________________________________ Accessibility-ia2 mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/accessibility-ia2
