Ejemplo n.º 1
0
        public ulong GetIntTagValue(KadTagNameString strTagName, bool bIncludeVirtualTags = true)
        {
            ulong uResult = 0;

            GetIntTagValue(strTagName, uResult, bIncludeVirtualTags);
            return(uResult);
        }
Ejemplo n.º 2
0
 public KadTagValueString GetStrTagValue(KadTagNameString strTagName)
 {
     for (TagList::const_iterator itTagList = m_listTag.begin(); itTagList != m_listTag.end(); itTagList++)
     {
         CKadTag *pTag = *itTagList;
         if (!pTag->m_name.Compare(strTagName) && pTag->IsStr())
         {
             return(pTag->GetStr());
         }
     }
     return("");
 }
Ejemplo n.º 3
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);
        }