2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2004 Net Integration Technologies, Inc.
5 * See wvsynclister.h for details.
9 #include "wvsynclister.h"
10 #include "wvsyncobj.h"
11 #include "wvsyncprotocol.h"
13 WvSyncLister::WvSyncLister(WvSyncProtocol
&_prot
)
14 : prot(_prot
), log("Lister", WvLog::Debug1
), err(log
.split(WvLog::Error
))
20 void WvSyncLister::run()
22 WvSyncObj
*newobj
= NULL
;
26 if (prot
.want_more() && prot
.num_in_flight() < WVSYNC_MAX_IN_FLIGHT
)
28 // sync the thing we found before we sent the yourturn
29 WvSyncObj
*oldobj
= NULL
;
35 if (oldobj
&& isdone(oldobj
->name
) == false)
36 prot
.do_ihave(oldobj
);
40 // might not be my turn anymore!
43 if (isdone(newobj
->name
) == false)
45 prot
.do_ihave(newobj
);
59 if (prot
.isreadable())
65 void WvSyncLister::do_chdir(WvStringParm dir
)
71 void WvSyncLister::markdone(WvStringParm name
)
73 donetbl
.add(new WvString(name
), true);
76 bool WvSyncLister::isdone(WvStringParm name
)
81 void WvSyncLister::cleardone()