示例#1
0
文件: Entry.cs 项目: radtek/eMule
        public ulong GetIntTagValue(KadTagNameString strTagName, bool bIncludeVirtualTags = true)
        {
            ulong uResult = 0;

            GetIntTagValue(strTagName, uResult, bIncludeVirtualTags);
            return(uResult);
        }
示例#2
0
文件: Entry.cs 项目: radtek/eMule
 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("");
 }
示例#3
0
文件: Entry.cs 项目: radtek/eMule
        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);
        }