Beispiel #1
0
void CMIPSTags::Unserialize(const char* sPath)
{
	try
	{
		Framework::CStdStream Stream(fopen(sPath, "rb"));
		RemoveTags();

		uint32 nCount = Stream.Read32();

		for(uint32 i = 0; i < nCount; i++)
		{
			char sTag[256];

			uint32 nKey		= Stream.Read32();
			uint8 nLength	= Stream.Read8();

			Stream.Read(sTag, nLength);
			sTag[nLength] = 0;

			InsertTag(nKey, sTag);
		}
	}
	catch(...)
	{
		
	}
}
Beispiel #2
0
btData * IsoHuntParser::CreateNode(string data, int * pos) {
	string source = "IsoHunt";
	string title = "";
	string size = "";
	string url = "";
	string file = "";
	string seed = "";
	string dl = "";
	string main_type = "OTHER";
	
	int cur_pos = *pos;
	const char * temp = data.c_str();
	int temp_pos = 0;
	if(b_scrape) {
		GetValue(data, &cur_pos, "1>", "<"); // age
		main_type = GetType(GetValue(data, &cur_pos, "3>", "<"));
		url = "http://isohunt.com/" + GetValue(data, &cur_pos, "href=\"", "\"");
		title = GetValue(data, &cur_pos, ">", "<");
		size = GetValue(data, &cur_pos, "3>", "<") + "MB";
		file = GetValue(data, &cur_pos, "3>", "<");
		seed = GetValue(data, &cur_pos, "3>", "<");
		dl = GetValue(data, &cur_pos, "3>", "<");
	}
	else {
		main_type = GetType(GetValue(data, &cur_pos, "3>", "<"));
		url = "http://isohunt.com/" + GetValue(data, &cur_pos, "href=\'", "\'");
		title = GetValue(data, &cur_pos, "a>", "</td");
		title = RemoveTags(title);

		size = GetValue(data, &cur_pos, "3\">", "<") + "MB";
		file = GetValue(data, &cur_pos, "3\">", "<");
		seed = GetValue(data, &cur_pos, "3\">", "<");
		dl = GetValue(data, &cur_pos, "3\">", "<");
	}
	btData * newData = new btData(title, size, url, main_type, seed, dl, source);
	cur_pos = (int)data.find("hlRow", cur_pos);

	*pos = cur_pos;
	return newData;
}
Beispiel #3
0
	void EntityManager::RemoveTags(Entity::ID id, const std::string& first, const std::string& second, const Args& ... args)
	{
		AUTO_PROFILE("EntityManager::RemoveTags");
		RemoveTags(id, first);
		RemoveTags(id, second, args ...);
	}