Merge change 4910 into donut
* changes: fix warnings that will show up with GCC 4.4 (in master)
This commit is contained in:
@ -71,7 +71,7 @@ namespace android {
|
|||||||
* The relative sizes of the stretchy segments indicates the relative
|
* The relative sizes of the stretchy segments indicates the relative
|
||||||
* amount of stretchiness of the regions bordered by the segments. For
|
* amount of stretchiness of the regions bordered by the segments. For
|
||||||
* example, regions 3, 7 and 11 above will take up more horizontal space
|
* example, regions 3, 7 and 11 above will take up more horizontal space
|
||||||
* than regions 1, 5 and 9 since the horizonal segment associated with
|
* than regions 1, 5 and 9 since the horizontal segment associated with
|
||||||
* the first set of regions is larger than the other set of regions. The
|
* the first set of regions is larger than the other set of regions. The
|
||||||
* ratios of the amount of horizontal (or vertical) space taken by any
|
* ratios of the amount of horizontal (or vertical) space taken by any
|
||||||
* two stretchable slices is exactly the ratio of their corresponding
|
* two stretchable slices is exactly the ratio of their corresponding
|
||||||
@ -87,7 +87,7 @@ namespace android {
|
|||||||
* the leftmost slices always start at x=0 and the rightmost slices
|
* the leftmost slices always start at x=0 and the rightmost slices
|
||||||
* always end at the end of the image. So, for example, the regions 0,
|
* always end at the end of the image. So, for example, the regions 0,
|
||||||
* 4 and 8 (which are fixed along the X axis) start at x value 0 and
|
* 4 and 8 (which are fixed along the X axis) start at x value 0 and
|
||||||
* go to xDiv[0] amd slices 2, 6 and 10 start at xDiv[1] and end at
|
* go to xDiv[0] and slices 2, 6 and 10 start at xDiv[1] and end at
|
||||||
* xDiv[2].
|
* xDiv[2].
|
||||||
*
|
*
|
||||||
* The array pointed to by the colors field lists contains hints for
|
* The array pointed to by the colors field lists contains hints for
|
||||||
@ -626,25 +626,25 @@ public:
|
|||||||
event_code_t next();
|
event_code_t next();
|
||||||
|
|
||||||
// These are available for all nodes:
|
// These are available for all nodes:
|
||||||
const int32_t getCommentID() const;
|
int32_t getCommentID() const;
|
||||||
const uint16_t* getComment(size_t* outLen) const;
|
const uint16_t* getComment(size_t* outLen) const;
|
||||||
const uint32_t getLineNumber() const;
|
uint32_t getLineNumber() const;
|
||||||
|
|
||||||
// This is available for TEXT:
|
// This is available for TEXT:
|
||||||
const int32_t getTextID() const;
|
int32_t getTextID() const;
|
||||||
const uint16_t* getText(size_t* outLen) const;
|
const uint16_t* getText(size_t* outLen) const;
|
||||||
ssize_t getTextValue(Res_value* outValue) const;
|
ssize_t getTextValue(Res_value* outValue) const;
|
||||||
|
|
||||||
// These are available for START_NAMESPACE and END_NAMESPACE:
|
// These are available for START_NAMESPACE and END_NAMESPACE:
|
||||||
const int32_t getNamespacePrefixID() const;
|
int32_t getNamespacePrefixID() const;
|
||||||
const uint16_t* getNamespacePrefix(size_t* outLen) const;
|
const uint16_t* getNamespacePrefix(size_t* outLen) const;
|
||||||
const int32_t getNamespaceUriID() const;
|
int32_t getNamespaceUriID() const;
|
||||||
const uint16_t* getNamespaceUri(size_t* outLen) const;
|
const uint16_t* getNamespaceUri(size_t* outLen) const;
|
||||||
|
|
||||||
// These are available for START_TAG and END_TAG:
|
// These are available for START_TAG and END_TAG:
|
||||||
const int32_t getElementNamespaceID() const;
|
int32_t getElementNamespaceID() const;
|
||||||
const uint16_t* getElementNamespace(size_t* outLen) const;
|
const uint16_t* getElementNamespace(size_t* outLen) const;
|
||||||
const int32_t getElementNameID() const;
|
int32_t getElementNameID() const;
|
||||||
const uint16_t* getElementName(size_t* outLen) const;
|
const uint16_t* getElementName(size_t* outLen) const;
|
||||||
|
|
||||||
// Remaining methods are for retrieving information about attributes
|
// Remaining methods are for retrieving information about attributes
|
||||||
@ -653,14 +653,14 @@ public:
|
|||||||
size_t getAttributeCount() const;
|
size_t getAttributeCount() const;
|
||||||
|
|
||||||
// Returns -1 if no namespace, -2 if idx out of range.
|
// Returns -1 if no namespace, -2 if idx out of range.
|
||||||
const int32_t getAttributeNamespaceID(size_t idx) const;
|
int32_t getAttributeNamespaceID(size_t idx) const;
|
||||||
const uint16_t* getAttributeNamespace(size_t idx, size_t* outLen) const;
|
const uint16_t* getAttributeNamespace(size_t idx, size_t* outLen) const;
|
||||||
|
|
||||||
const int32_t getAttributeNameID(size_t idx) const;
|
int32_t getAttributeNameID(size_t idx) const;
|
||||||
const uint16_t* getAttributeName(size_t idx, size_t* outLen) const;
|
const uint16_t* getAttributeName(size_t idx, size_t* outLen) const;
|
||||||
const uint32_t getAttributeNameResID(size_t idx) const;
|
uint32_t getAttributeNameResID(size_t idx) const;
|
||||||
|
|
||||||
const int32_t getAttributeValueStringID(size_t idx) const;
|
int32_t getAttributeValueStringID(size_t idx) const;
|
||||||
const uint16_t* getAttributeStringValue(size_t idx, size_t* outLen) const;
|
const uint16_t* getAttributeStringValue(size_t idx, size_t* outLen) const;
|
||||||
|
|
||||||
int32_t getAttributeDataType(size_t idx) const;
|
int32_t getAttributeDataType(size_t idx) const;
|
||||||
|
@ -544,7 +544,7 @@ ResXMLParser::event_code_t ResXMLParser::next()
|
|||||||
return mEventCode;
|
return mEventCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int32_t ResXMLParser::getCommentID() const
|
int32_t ResXMLParser::getCommentID() const
|
||||||
{
|
{
|
||||||
return mCurNode != NULL ? dtohl(mCurNode->comment.index) : -1;
|
return mCurNode != NULL ? dtohl(mCurNode->comment.index) : -1;
|
||||||
}
|
}
|
||||||
@ -555,12 +555,12 @@ const uint16_t* ResXMLParser::getComment(size_t* outLen) const
|
|||||||
return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
|
return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint32_t ResXMLParser::getLineNumber() const
|
uint32_t ResXMLParser::getLineNumber() const
|
||||||
{
|
{
|
||||||
return mCurNode != NULL ? dtohl(mCurNode->lineNumber) : -1;
|
return mCurNode != NULL ? dtohl(mCurNode->lineNumber) : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int32_t ResXMLParser::getTextID() const
|
int32_t ResXMLParser::getTextID() const
|
||||||
{
|
{
|
||||||
if (mEventCode == TEXT) {
|
if (mEventCode == TEXT) {
|
||||||
return dtohl(((const ResXMLTree_cdataExt*)mCurExt)->data.index);
|
return dtohl(((const ResXMLTree_cdataExt*)mCurExt)->data.index);
|
||||||
@ -583,7 +583,7 @@ ssize_t ResXMLParser::getTextValue(Res_value* outValue) const
|
|||||||
return BAD_TYPE;
|
return BAD_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int32_t ResXMLParser::getNamespacePrefixID() const
|
int32_t ResXMLParser::getNamespacePrefixID() const
|
||||||
{
|
{
|
||||||
if (mEventCode == START_NAMESPACE || mEventCode == END_NAMESPACE) {
|
if (mEventCode == START_NAMESPACE || mEventCode == END_NAMESPACE) {
|
||||||
return dtohl(((const ResXMLTree_namespaceExt*)mCurExt)->prefix.index);
|
return dtohl(((const ResXMLTree_namespaceExt*)mCurExt)->prefix.index);
|
||||||
@ -598,7 +598,7 @@ const uint16_t* ResXMLParser::getNamespacePrefix(size_t* outLen) const
|
|||||||
return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
|
return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int32_t ResXMLParser::getNamespaceUriID() const
|
int32_t ResXMLParser::getNamespaceUriID() const
|
||||||
{
|
{
|
||||||
if (mEventCode == START_NAMESPACE || mEventCode == END_NAMESPACE) {
|
if (mEventCode == START_NAMESPACE || mEventCode == END_NAMESPACE) {
|
||||||
return dtohl(((const ResXMLTree_namespaceExt*)mCurExt)->uri.index);
|
return dtohl(((const ResXMLTree_namespaceExt*)mCurExt)->uri.index);
|
||||||
@ -613,7 +613,7 @@ const uint16_t* ResXMLParser::getNamespaceUri(size_t* outLen) const
|
|||||||
return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
|
return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int32_t ResXMLParser::getElementNamespaceID() const
|
int32_t ResXMLParser::getElementNamespaceID() const
|
||||||
{
|
{
|
||||||
if (mEventCode == START_TAG) {
|
if (mEventCode == START_TAG) {
|
||||||
return dtohl(((const ResXMLTree_attrExt*)mCurExt)->ns.index);
|
return dtohl(((const ResXMLTree_attrExt*)mCurExt)->ns.index);
|
||||||
@ -630,7 +630,7 @@ const uint16_t* ResXMLParser::getElementNamespace(size_t* outLen) const
|
|||||||
return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
|
return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int32_t ResXMLParser::getElementNameID() const
|
int32_t ResXMLParser::getElementNameID() const
|
||||||
{
|
{
|
||||||
if (mEventCode == START_TAG) {
|
if (mEventCode == START_TAG) {
|
||||||
return dtohl(((const ResXMLTree_attrExt*)mCurExt)->name.index);
|
return dtohl(((const ResXMLTree_attrExt*)mCurExt)->name.index);
|
||||||
@ -655,7 +655,7 @@ size_t ResXMLParser::getAttributeCount() const
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int32_t ResXMLParser::getAttributeNamespaceID(size_t idx) const
|
int32_t ResXMLParser::getAttributeNamespaceID(size_t idx) const
|
||||||
{
|
{
|
||||||
if (mEventCode == START_TAG) {
|
if (mEventCode == START_TAG) {
|
||||||
const ResXMLTree_attrExt* tag = (const ResXMLTree_attrExt*)mCurExt;
|
const ResXMLTree_attrExt* tag = (const ResXMLTree_attrExt*)mCurExt;
|
||||||
@ -678,7 +678,7 @@ const uint16_t* ResXMLParser::getAttributeNamespace(size_t idx, size_t* outLen)
|
|||||||
return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
|
return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int32_t ResXMLParser::getAttributeNameID(size_t idx) const
|
int32_t ResXMLParser::getAttributeNameID(size_t idx) const
|
||||||
{
|
{
|
||||||
if (mEventCode == START_TAG) {
|
if (mEventCode == START_TAG) {
|
||||||
const ResXMLTree_attrExt* tag = (const ResXMLTree_attrExt*)mCurExt;
|
const ResXMLTree_attrExt* tag = (const ResXMLTree_attrExt*)mCurExt;
|
||||||
@ -701,7 +701,7 @@ const uint16_t* ResXMLParser::getAttributeName(size_t idx, size_t* outLen) const
|
|||||||
return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
|
return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint32_t ResXMLParser::getAttributeNameResID(size_t idx) const
|
uint32_t ResXMLParser::getAttributeNameResID(size_t idx) const
|
||||||
{
|
{
|
||||||
int32_t id = getAttributeNameID(idx);
|
int32_t id = getAttributeNameID(idx);
|
||||||
if (id >= 0 && (size_t)id < mTree.mNumResIds) {
|
if (id >= 0 && (size_t)id < mTree.mNumResIds) {
|
||||||
@ -710,7 +710,7 @@ const uint32_t ResXMLParser::getAttributeNameResID(size_t idx) const
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int32_t ResXMLParser::getAttributeValueStringID(size_t idx) const
|
int32_t ResXMLParser::getAttributeValueStringID(size_t idx) const
|
||||||
{
|
{
|
||||||
if (mEventCode == START_TAG) {
|
if (mEventCode == START_TAG) {
|
||||||
const ResXMLTree_attrExt* tag = (const ResXMLTree_attrExt*)mCurExt;
|
const ResXMLTree_attrExt* tag = (const ResXMLTree_attrExt*)mCurExt;
|
||||||
|
Reference in New Issue
Block a user