Last active
August 29, 2015 14:27
-
-
Save MicBrain/a2caaa88f81acd177f06 to your computer and use it in GitHub Desktop.
Test Add and WaitForNext from MultiFetcher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main () { | |
std::string *brr = new std::string("http://textfiles.com/100/914bbs.txt"); | |
std::string *grr = new std::string("http://textfiles.com/100/ad.txt"); | |
std::string *vrr = new std::string("http://textfiles.com/100/balls.txt"); | |
std::string *zrr = new std::string("http://textfiles.com/anarchy/001.txt"); | |
std::string *rrr = new std::string("http://textfiles.com/anarchy/176.txt"); | |
std::string *arr = new std::string("http://textfiles.com/hacking/22.txt"); | |
std::string *crr = new std::string("http://textfiles.com/hacking/2600-9-3.txt"); | |
download::JobInfo info1 = download::JobInfo(brr); | |
download::JobInfo info2 = download::JobInfo(grr); | |
download::JobInfo info3 = download::JobInfo(vrr); | |
download::JobInfo info4 = download::JobInfo(zrr); | |
download::JobInfo info5 = download::JobInfo(rrr); | |
download::JobInfo info6 = download::JobInfo(arr); | |
download::JobInfo info7 = download::JobInfo(crr); | |
download::JobInfo *add1; | |
add1 = &info1; | |
download::JobInfo *add2; | |
add2 = &info2; | |
download::JobInfo *add3; | |
add3 = &info3; | |
download::JobInfo *add4; | |
add4 = &info4; | |
download::JobInfo *add5; | |
add5 = &info5; | |
download::JobInfo *add6; | |
add6 = &info6; | |
download::JobInfo *add7; | |
add7 = &info7; | |
download::MultiFetcher mult = download::MultiFetcher(); | |
mult.Add(add1); | |
mult.Add(add2); | |
mult.Add(add3); | |
mult.Add(add4); | |
mult.Add(add5); | |
mult.Add(add6); | |
mult.Add(add7); | |
download::JobInfo *job_info; | |
while((job_info = mult.WaitForNext()) != NULL) { | |
std::cout << *job_info->url << std::endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment