diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2006-08-14 15:03:38 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2006-08-14 15:03:38 +0000 |
| commit | 11dc664f836e445480936db7de5ac22800d516fb (patch) | |
| tree | b3d334256d585f19ec16eb0e8b7e7f748bf55c52 /src/DownloadEngine.h | |
| parent | e3b0153e85247f546387aa50e7e7b96f6ac902a2 (diff) | |
2006-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/FeatureConfig.cc
(FEATURE_ASYNC_DNS): New definition.
(FeatureConfig): Added aysnc DNS entry.
To replace CommandUuid with Command* in SocketEntry and
NameResolverEntry:
* src/DownloadEngine.h
(CommandUuids): Removed.
(SocketEntry::commandUuid): Removed.
(SocketEntry::command): New variable.
(SocketEntry::SocketEntry): Updated.
(SocketEntry::operator==): Updated.
(NameResolverEntry::commandUuid): Removed.
(NameResolverEntry::command): New variable.
(NameResolverEntry::NameResolverEntry): Updated.
(NameResolverEntry::operator==): Updated.
(waitData): Changed the argument type.
(addSocketForReadCheck): Changed the argument type.
(deleteSocketForReadCheck): Changed the argument type.
(addSocketForWriteCheck): Changed the argument type.
(deleteSocketForWriteCheck): Changed the argument type.
(addNameResolverCheck): Changed the argument type.
(deleteNameResolverCheck): Changed the argument type.
* src/DownloadEngine.cc
(FindCommand): Removed.
(run): Removed activeUuid. Added activeCommands instead.
(AccumulateActiveUuid): Renamed as AccumulateActiveCommand.
(AccumulateActiveCommand): New function object.
(waitData): Use AccumulateActiveCommand.
(addSocketForReadCheck): Use Command instead of CommandUuid.
(deleteSocketForReadCheck): Use Command instead of CommandUuid.
(addSocketForWriteCheck): Use Command instead of CommandUuid.
(deleteSocketForWriteCheck): Use Command instead of CommandUuid.
(addNameResolverCheck): Use Command instead of CommandUuid.
(deleteNameResolverCheck): Use Command instead of CommandUuid.
* src/AbstractCommand.cc
(disableReadCheckSocket): Updated according to the changes in
DownloadEngine.
(setReadCheckSocket): Updated according to the changes in
DownloadEngine.
(disableWriteCheckSocket): Updated according to the changes in
DownloadEngine.
(setWriteCheckSocket): Updated according to the changes in
DownloadEngine.
(setNameResolverCheck): Updated according to the changes in
DownloadEngine.
(disableNameResolverCheck): Updated according to the changes in
DownloadEngine.
* src/AbstractCommand.cc
(disableReadCheckSocket): Updated according to the changes in
DownloadEngine.
(setReadCheckSocket): Updated according to the changes in
DownloadEngine.
(disableWriteCheckSocket): Updated according to the changes in
DownloadEngine.
(setWriteCheckSocket): Updated according to the changes in
DownloadEngine.
* release 0.7.1
Diffstat (limited to 'src/DownloadEngine.h')
| -rw-r--r-- | src/DownloadEngine.h | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/src/DownloadEngine.h b/src/DownloadEngine.h index b412ce3b..26b7c753 100644 --- a/src/DownloadEngine.h +++ b/src/DownloadEngine.h @@ -34,7 +34,6 @@ typedef deque<SocketHandle> Sockets; typedef deque<Command*> Commands; -typedef deque<CommandUuid> CommandUuids; class SocketEntry { public: @@ -44,18 +43,18 @@ public: }; SocketHandle socket; - CommandUuid commandUuid; + Command* command; TYPE type; public: SocketEntry(const SocketHandle& socket, - const CommandUuid& commandUuid, + Command* command, TYPE type): - socket(socket), commandUuid(commandUuid), type(type) {} + socket(socket), command(command), type(type) {} ~SocketEntry() {} bool operator==(const SocketEntry& entry) { return socket == entry.socket && - commandUuid == entry.commandUuid && + command == entry.command && type == entry.type; } }; @@ -66,16 +65,16 @@ typedef deque<SocketEntry> SocketEntries; class NameResolverEntry { public: NameResolverHandle nameResolver; - CommandUuid commandUuid; + Command* command; public: NameResolverEntry(const NameResolverHandle& nameResolver, - const CommandUuid& commandUuid): - nameResolver(nameResolver), commandUuid(commandUuid) {} + Command* command): + nameResolver(nameResolver), command(command) {} ~NameResolverEntry() {} bool operator==(const NameResolverEntry& entry) { return nameResolver == entry.nameResolver && - commandUuid == entry.commandUuid; + command == entry.command; } }; @@ -85,7 +84,7 @@ typedef deque<NameResolverEntry> NameResolverEntries; class DownloadEngine { private: - void waitData(CommandUuids& activeUuids); + void waitData(Commands& activeCommands); SocketEntries socketEntries; #ifdef HAVE_LIBARES NameResolverEntries nameResolverEntries; @@ -119,18 +118,18 @@ public: void updateFdSet(); bool addSocketForReadCheck(const SocketHandle& socket, - const CommandUuid& commandUuid); + Command* command); bool deleteSocketForReadCheck(const SocketHandle& socket, - const CommandUuid& commandUuid); + Command* command); bool addSocketForWriteCheck(const SocketHandle& socket, - const CommandUuid& commandUuid); + Command* command); bool deleteSocketForWriteCheck(const SocketHandle& socket, - const CommandUuid& command); + Command* command); #ifdef HAVE_LIBARES bool addNameResolverCheck(const NameResolverHandle& resolver, - const CommandUuid& uuid); + Command* command); bool deleteNameResolverCheck(const NameResolverHandle& resolver, - const CommandUuid& uuid); + Command* command); #endif // HAVE_LIBARES }; |
