Example #1
0
        public bool GetIntTagValue(KadTagNameString strTagName, ulong rValue, bool bIncludeVirtualTags)
        {
            for (TagList::const_iterator itTagList = m_listTag.begin(); itTagList != m_listTag.end(); itTagList++)
            {
                KadTag pTag = *itTagList;
                if (pTag.IsInt() && !pTag.m_name.Compare(strTagName))
                {
                    rValue = pTag->GetInt();
                    return(true);
                }
            }

            if (bIncludeVirtualTags)
            {
                // SizeTag is not stored anymore, but queried in some places
                if (!strTagName.Compare(TAG_FILESIZE))
                {
                    rValue = m_uSize;
                    return(true);
                }
            }
            rValue = 0;
            return(false);
        }