6 |
|
|
7 |
|
#include "Publisher.hpp" |
8 |
|
#include "Rss.hpp" |
9 |
+ |
#include "Atom.hpp" |
10 |
|
|
11 |
|
Publisher::Publisher(const std::set<Buddy>& buddies, const Database& database, bool start) : buddies(buddies), |
12 |
|
database(database), start(start) |
20 |
|
|
21 |
|
// publish |
22 |
|
|
23 |
< |
while (true) |
23 |
> |
// while (true) |
24 |
|
{ |
25 |
< |
double next(api::GetWallTimerSeconds() + Hour(1)), now; |
25 |
> |
// Stamp stamp; |
26 |
> |
// double next(api::GetWallTimerSeconds() + Hour(1)), now; |
27 |
|
|
28 |
|
update(); |
29 |
|
|
30 |
< |
do |
30 |
> |
// cerr << stamp << '\n'; |
31 |
> |
|
32 |
> |
// do |
33 |
|
{ |
34 |
< |
sleep(Minute(1)); |
34 |
> |
// sleep(Minute(1)); |
35 |
|
|
36 |
< |
now = api::GetWallTimerSeconds(); |
36 |
> |
// now = api::GetWallTimerSeconds(); |
37 |
|
} |
38 |
< |
while (now < next); |
38 |
> |
// while (now < next); |
39 |
|
} |
40 |
|
} |
41 |
|
|
59 |
|
messages->GetString("stamp"))); |
60 |
|
|
61 |
|
Rss rss(*buddy, messages_, stamp); |
62 |
+ |
Atom atom(*buddy, messages_, stamp); |
63 |
|
} |
64 |
|
} |